search for: file_column_field

Displaying 20 results from an estimated 39 matches for "file_column_field".

2006 Feb 16
4
file_column :: changing image with object.update
Dear all, file_column now works fine with object.save i.e., it updates my database field with the correct image file name and places the image file into the correct public folder. However, I cannot get file_column to work the same way with object.update when trying to change image. It only updates my field with the image file name. However, the new image is not copied into the correct
2006 Jan 03
3
file_column howto (beginner)
...se file_column as a Rails plugin. Of course I read the doc (from Sebastian, this maillist) and little bit of source (as good as I, newbie, could understand it).. But I''m not able to implement it in my app.. I''m a totally newbie with less software development experience. I get the file_column_field in my view with simply invoking the helper... (:multipart => true). But what''s next? - Do I need to declare the instance methods in my model class? - What do I need to do with my controller, to get the process work? Maybe somebody could provide me a little example source of model,...
2006 Jan 22
2
File_column not keeping value during page reloads
...redirect_to :action => ''list'' else render :action => ''new'' end end And the relevant section from my _form.rhtml file: <label for=''newsletterpost_filename''>Attachment:</label><br/> <%= file_column_field ''newsletterpost'', ''filename'' %> <br /><br /> And my newsletterpost model: class Newsletterpost < ActiveRecord::Base belongs_to :user belongs_to :newslettercategory file_column :filename validates_presence_of :title end Any suggestio...
2006 May 28
4
File_column trouble, advice needed
...d other errors, im following the instructions on http://wiki.rubyonrails.com/rails/pages/HowToUseFileColumn but doesnt seems to work, this its the code im using: #----view <%= form_tag({:action=>''create_art_image'', :id=> @art_image}, :multipart => true)%> <%= file_column_field "art_image", "image" %><br/> <%= submit_tag ''Upload'' -%> <%= end_form_tag %> #---controller action def create_art_image @art_image = ArtImage.new(@params[:art_image]) end #----model file_column :image i have my table(items) fields asi th...
2006 May 02
3
file_column : _temp field always nil
Hi, I''m trying to set up file_column to upload attachments for emails. My view has <td align="left"><%= file_column_field ''to_do'', ''attachment'' %></td> and the attachment_temp hidden field is generated. When I inspect tthe params on saving the form the attachment_temp param is always an empty string. Also, when I was setting this up I got a no method error attachment_te...
2006 Apr 25
7
[TIPS] File_column plugin and multiple file uploads
No..i am not a full time rails developer...i code in pl/sql for paying my bills...and i am just working on a pet project...so i had some trouble in doing..what i specify in the subject.....now somehow i solved this problem...so those interested can look at the code at: http://hemant.wordpress.com/2006/04/25/file_column-and-how-the-fuck-it-handles-multiple-files/ I write this mail and
2008 Jan 14
5
Only "form_tag" support uploading file?
...ollow & it works well: ==================== <h1>New entry</h1> <%= error_messages_for ''entry'' %> <% form_tag ''create'', :multipart => true do -%> <p><label for="entry_image">Image</label><br/> <%= file_column_field ''entry'', ''image'' %></p> <%= submit_tag ''create'' %> <% end -%> <%= link_to ''Back'', entries_path %> ===================== However, in my real app, I scaffold and nest the resource to RESTful, the v...
2006 Jul 14
5
file_column and has_many
...r some others'' thoughts on the subject. I essentially have the following models in place: class Item < ActiveRecord::Base has_many :images end class Image < ActiveRecord::Base belongs_to :item file_column :filename end In my view, I have javascript that basically creates N file_column_fields for uploading multiple images. The problem I''m facing is in the controller. What is the best method for getting all of these files through the has_many and into file_column? I''ve tried a number of variations on Image.new to no avail. I know someone out there on the interweb h...
2006 Jan 12
5
file_column preview in multistage forms
i have a 2 step form which contains 1 file_column field. The second form is just "This is how your post will look" kind of form and the user can click Edit (to take them back to form1) or Submit. If the user clicks edit it takes them back to the first form with fields populated. I have it working with all text fields, I just dont know how to do this with file_column field (showing the
2006 Jun 10
0
Dynamic file paths in FileColumn
...can see that there is a DEFAULT_OPTION hash with some root path options and such which can be merged from an options paramater. These static path changes are not a problem. My question is dynamic path options. My upload form, when you boil it down, has two fields. The first is the ''file_column_field'' form helper which grabs the file off the harddrive and adds its filename to a :path attribute of the Model. The second is a drop down which selects from a list of publications that the file belongs to. This gets written to the :publication attribute in the Model. Id like to pass th...
2006 May 19
1
FileColumn
...nstalled RMagic gem thingy and FileColumn plugin ok. I followed instructions exactly as directed on FileColumn web site which is very straight forward: ---model class My_model < ActiveRecord::Base file_column :column_for_file_name end -----view -upload form--set to mulitpart <%= file_column_field "my_model", "column_for_file_name" %> ---controller upload @my_model = My_model.new() @my_model.save(params[:my_model]) end I get a new record inserted into the database but without the filename value and no file is uploaded, althought the directory structure is cre...
2006 Apr 08
5
file_column
hello, how to generate new image if i do add new version? For example, I add version :small => { :size => "320x240" } . How to tell file_column to generate new image version if image is allready uploaded ? Thank you! -- Posted via http://www.ruby-forum.com/.
2006 Jan 11
1
fiile_column persistent across different forms
is there a way to keep the file_column field in the form persistent across diffferent view templates ? In my controller (same controller for both views) i do @post = Post.new in the view i do form_step1.rhtml --------------------- <%= file_column_field "post", "image" %> <% if @post["image"] %> <%= image_tag url_for_file_column("post", "image") %> <% end %> form_step2.rhtml ---------------- <% if @post["image"] %> <%= image_tag url_f...
2005 Dec 27
1
filecolumn to database
Hi, I''m using filecolumn to upload a file to mysql blob : _form.rhtml : file_column_field "entry", "attach" model (rb file) : file_column :attach How can I update controller create function to insert file in database ? redefine model save function ? Someone has a sample source ? Regards, Fabian
2006 Mar 20
1
FileColumn question
Can someone please help me with this. I have an Images table :- create table images ( id integer unsigned not null auto_increment primary key, image varchar(200) not null default '''' )ENGINE=InnoDB default CHARSET=latin1; And a car table :- create table cars ( id integer unsigned not null auto_increment primary key, user_id integer unsigned not null, title varchar(100) not
2005 Dec 14
3
image upload (apache2.0+ lighttpd)
...s and refuse to work sometimes. Function in the controller is (@user is loaded in before_filter) def update_watermark @user.watermark = params[:user][:watermark] @user.save redirect_to :action => "index" end Model is file_column :watermark and my view is <%= file_column_field "user", "watermark", :size=>10, :style=>"float:left;width:100px" %> Error I got is; The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /myXC/update_avatar. Reason: Error reading from re...
2006 Jul 11
1
responds_to_parent plugin
...n="create"> <div> <%= text_field("publisher", "name", "size" => 20) %> </div> <div> <%= text_field("publisher", "website", "size" => 20) %> </div> <div> <%= file_column_field("publisher", "logo") %> </div> <div> <%= submit_tag("Save") %> <%= end_form_tag %> </div> <iframe id=''frame'' name="frame" src="about:blank;" style="width: 1px;height:1px;">&...
2006 Jun 27
4
File Column has me stumped
...''s what I have so far: View: <%= start_form_tag ({:action => ''settings_save'', :id => @user.id}, :multipart => true) %> <%= error_messages_for ''user'' %> <p><label for="user_pic"></label><br/> <%= file_column_field "user", "pic" %></p> <%= submit_tag "Change" %> <%= end_form_tag %> controller: def settings_save @user = User.find(params[:id]) @user.update_attribute("pic", params[:pic]) end In the log: Parameters: {"user"=>{&quo...
2006 Apr 28
2
file_column with polymorphic table relationship?
...ot; => "640x480>" }, :attributes => { :format => "JPG" } } end Now, in an Image view - which in practice I don''t think I would use, but for the sake of demonstration - I can do something like this to get the uploads working without a problem: <%= file_column_field "image", "file" %> But how would I do the same from the so-called "Thing" view? Or is it not possible to handle in the view without writing a model method? I''d prefer not to, as there would be several models with duplicated code. Thank you! Dan Naab
2006 Aug 13
5
problems with file_column plugin
1) installation is not as smooth as some other plug-ins. If you follow the instructions on http://www.kanthak.net/opensource/file_column/ it makes a directory called trunk instead of file_column. You have to manually rename it to file_column. I guess this is a minor annoyance but it gives me the feeling that things aren''t quite like other plugins. 2) I get this error: undefined