Remote: True Option Is Not Working With File Field In Rails 4
I am trying to submit form via ajax using remote:true option which contains input fields as well as file fields (need to upload images) Here is my view = form_tag('/campaigns/uplo
Solution 1:
remote: true
does not work with multipart/file upload.
You can use remotipart gem for this.
https://github.com/JangoSteve/remotipart/blob/master/README.rdoc
Solution 2:
You're using form_tag
instead of form_for
. So, use file_field_tag instead of file_field
.
Post a Comment for "Remote: True Option Is Not Working With File Field In Rails 4"