I have remotipart in my gem file:
gem 'remotipart',:require=>'remotipart'
and is not in a group
On the development remote uploading with remotipart 1.2.1 works with no issue:
<%= form_tag upload_gallery_image_path, :remote => true do %>
<%= file_field_tag 'image', :accept => %w(image/png image/jpeg image/bmp image/gif image/x-xbitmap image/bmp) %>
<%= submit_tag 'upload'%>
produces this:
Parameters: {"utf8"=>"✓", "authenticity_token"=>"zrJLp+YwjSR8TjmJeQS8JQnLtJU9o9ZJ9JKeADSMuDI=", "commit"=>"upload", "remotipart_submitted"=>"true", "X-Requested-With"=>"IFrame", "X-Http-Accept"=>"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01", "image"=>#<ActionDispatch::Http::UploadedFile:0x007f5cfbdec740 @original_filename="dragon.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"image\"; filename=\"dragon.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<Tempfile:/tmp/RackMultipart20130730-7136-drtbwz>>}
I have this debugging statement in:
if remotipart_submitted?
puts 'yes'
else
puts 'no'
end
It prints yes, and paperclip does it thing.
In production the debugging statement prints no and the parameters are:
Parameters: {"utf8"=>"✓", "authenticity_token"=>"NW7HCQXZHRuqnS22ar/h8T6Vu1wTtN9fYm63ZJbpnRU=", "image"=>"dragon.jpg", "commit"=>"upload"}
and paperclip predictably chokes on that since no image is upload.
Yes remotipart is installed on the server and it seems everything got loaded because remotipart_submitted?
is defined.