Cannot get multipart => true , running well in my form when using remote => true

I have a simple form , with a file field
= form_for (, :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value =>}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)

generating the html code


which seems to be OK ( compared to tutorial …)

but when if I check the params sent in my controller , I DON’T GET
the clip[image] …

(rdb:9) params
{“utf8”=>“✓”, “authenticity_token”=>“1ovVVdl+oh17phaR4ZVMc/wZpL5v07YMBh
“clip”=>{“user_id”=>“9”, “name”=>“test”, “description”=>“testing image
“commit”=>“Add”, “action”=>“create”, “controller”=>“clips”,

I should have the image upload data :
@original_filename="…", @content_type=“image/jpeg”, @headers=…

what could be wrong ? is the remote-true incompatible ?

[SOLVED … well not solved but IMPOSSIBLE] seems cannot be done
via Ajax … need to review my design

So, you want to upload Files (Images, PDFs) via Ajax. Well thats not
impossible at all. We can upload files using Ajax. I have done it and it
working quite fine for me.

Please! take a look at this tutorial. I’ am sure it will helps you a


On 16 May 2011 15:12, Erwin [email protected] wrote:

    = f.text_area :description

wZpL5v07YMBh+KsEqjTpk=" />

@original_filename=“…”, @content_type=“image/jpeg”, @headers=…
For more options, visit this group at

Imran Latif, Software Engineer
NextBridge Pvt. Ltd, Lahore
+92-322-6526002 (Mobile)