File UPLOAD and put it on a DB BLOB

@contact =     @contact.file_file_name=params[:contact][:file].original_filename     @contact.file_content_type=params[:contact][:file].content_type.chomp     @contact.file=params[:contact][:file].read

the first two elements work,

@contact.file=params[:contact][:file].read results empty, can you say me where I am wrong.


Hi Sergio,

It looks like you're using Paperclip, based on the "file_name_name" and "file_content_type" etc., attributes? Is this right? I'm not sure... if you're not, you should try Paperclip.

I wrote an extension to Paperclip to handle saving to a DB BLOB; see

Here's a tutorial/example on how to save a file as a BLOB:

- pat