foxnewsnetwork / rubyopenvn

Ruby-based implementation of FFOpenVN as ported over from nodejs
1 stars 0 forks source link

:multipart => true, :remote => true issue #8

Open foxnewsnetwork opened 12 years ago

foxnewsnetwork commented 12 years ago

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?

trevor-umeda commented 12 years ago

This should be doable. I'm pretty sure I've done it on a separate project. Let me look into it

foxnewsnetwork commented 12 years ago

Good luck. Also, irrelevant, but still applicable: http://i299.photobucket.com/albums/mm281/foxnewsnetwork/1338613387545.jpg

foxnewsnetwork commented 12 years ago

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/