-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remotipart posting twice #129
Comments
Same Issue with Rails '4.2.1' and remotipart 1.2.1. it does Started POST "/operations/import" for 127.0.0.1 at 2015-06-10 18:03:50 -0430 ... Started POST "/operations/import" for 127.0.0.1 at 2015-06-10 18:03:50 -0430 ... This happens when uploading a file and using this form for doing so = form_tag import_operations_path, remote: true, method: :post, multipart: true , id: "csv_document"do
.row
.col-xs-4
= file_field_tag :file
.col-xs-4
= submit_tag "Import", id: "send_csv"
.col-xs-4 Also one of the resquests has params without the uploaded file (the one as /) while the other has the file as You can see in the code up As a solution to avoid this double call while the error persist I used the the next coffeescript which prevents the empty request(the one without the file ) to fire and only sends the one with the file $(document).ready ->
$('#send_csv').on 'click', (e) ->
e.preventDefault()
$('#csv_document').submit() |
Same thing here with rails 5 and remotipart 1.3.1.
Thanks @monttda for the temporary workaround. |
Catching |
Is this still open issue, facing the same problem? |
is like jquery-ujs is not preventing its default functionality. |
jqXHR.complete() callback was removed from jQuery 3.0. |
Hi, im using remotipart and paperclip for the file and it is posting twice and creating 2 objects, once with a html post and the second one with the JS post(the one I want). im using rails 4.2.1 and the lates version of remotipart.
Hope someone could help me
Thanx
The text was updated successfully, but these errors were encountered: