-
Notifications
You must be signed in to change notification settings - Fork 39
Multipart form data not working on Firefox #90
Comments
what does the request payload look according to the browser's dev tools? |
Firefox request headers:
Firefox params:
Chrome (all in one):
|
Interesting. I'd be curious to know if the underlying |
That definitely seems like the issue. Not sure when or how this happened. Sounds like a browser-specific bug in ajax-form. Setting breakpoints in the code when |
I have not been able to get ajax-form to play nice with Firefox when uploading files as multipart/form-data encoding. Uploads work just fine in Chrome and Safari.
I am using ajax-form version 2.1.4 within a Polymer project (v1.8.1) using webcomponents-lite polyfil (0.7.24).
When the data comes to the backend (Java servlet using Jersey) the fileDetail has null values and the entire contents of the InputStream will be file filename string value. On Chrome and Safari the filename is attached to the fileDetail, and the InputStream is the contents of the file (like it should be).
The html is just a basic ajax-form using elements.
The javascript attached to the form is not doing any pre-processing on the upload, just watching for a response
The backend java code is pretty simple as well.
When using firefox the backend will receive data that looks something like this. The content of the input stream will just be the string
Case Cap Report v1.1.csv
(the file name), not the content of the file. The file detail does not contain the filename.When using Chrome or Safari the filename is attached to the fileDetail correctly and the input stream has the contents of the file.
The text was updated successfully, but these errors were encountered: