File_column problem


#1

Hello all,

I get the message below when I try to use the file_column plugin in my
app to upload files. I have followed the instructions on the
file_column website and the RoR rails wiki with no luck. Any ideas?

I would be happy to provide more details wrt my controller, view,
model, etc should they be required! I am not doing anything crazy
though so I think I am just overlooking something.

Error:
Do not know how to handle a string with value ‘misc.jpg’ that was
passed to a file_column. Check if the form’s encoding has been set to
‘multipart/form-data’.

Thanks in advance!

Andrew


#2

Your form needs to be rendered as multipart because it is handling
binary data (the file being upload).

In the view which displays the form with the file upload add “:multipart
=> true”, as an example:

<%= start_form_tag({:action=>‘update’, :id => @category}, :multipart =>
true)%>

hope that helps, Kris.

Andrew VanSpronsen wrote:

Hello all,

I get the message below when I try to use the file_column plugin in my
app to upload files. I have followed the instructions on the
file_column website and the RoR rails wiki with no luck. Any ideas?

I would be happy to provide more details wrt my controller, view,
model, etc should they be required! I am not doing anything crazy
though so I think I am just overlooking something.

Error:
Do not know how to handle a string with value ‘misc.jpg’ that was
passed to a file_column. Check if the form’s encoding has been set to
‘multipart/form-data’.

Thanks in advance!

Andrew


#3

Perfect! I had that statement but not with the brackets as you did.
Thanks
so much!

Andrew

On 12/13/05, Kris L. removed_email_address@domain.invalid wrote:

I would be happy to provide more details wrt my controller, view,

removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails