I've successfully uploaded a file using PUT and html, but is there a way to upload a file in a ajax remote_form_for ?
I've tried this to no success:
<% remote_form_for @song,:html => { :multipart => true }, :url => { :action => 'upload' } do |f| %>
I've successfully uploaded a file using PUT and html, but is there a way to upload a file in a ajax remote_form_for ?
I've tried this to no success:
<% remote_form_for @song,:html => { :multipart => true }, :url => { :action => 'upload' } do |f| %>
Hi,
Check this: http://www.williambharding.com/blog/rails/rails-ajax-image-uploading-made-simple-with-jquery/
The standard remote_form_for doesn’t understand multipart form submission so you can't actually do this without some leg-work as indicated by yoda above.
The other way to achieve this is by using an iframe.