Open foxnewsnetwork opened 12 years ago
This should be doable. I'm pretty sure I've done it on a separate project. Let me look into it
Good luck. Also, irrelevant, but still applicable: http://i299.photobucket.com/albums/mm281/foxnewsnetwork/1338613387545.jpg
No wonder this never worked! It was never the rails code, but my chrome browser. Found a good article on this business: http://www.alfajango.com/blog/ajax-file-uploads-with-the-iframe-method/
Given a standard ujs file-upload rails form using PUT:
<%= form_for resource, :html => { :multipart => true}, :method => :put, :remote => true do |f| %> ... <% end %>
When the file-upload field is filled in, the request is sent as a standard put request, but when it is not filled in the regular ajax request goes through. Can we please resolve this so that, regardless if there is or isn't a file, only an ajax request goes through please?