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
posting with formdata not working #65
Comments
Can you put "not working" into detail? |
@flogball00 are you still having this problem? |
Yep, both axios and superagent were not able to transmit the filename. When i looked at the request payload, i would get something like "Content-Disposition: form-data; name="File1"; filename="" |
Odd. I'll have to look into jQuery's source, and see what's different. |
@flogball00: Have you tried to use the third argument for formData suppling the filename? https://developer.mozilla.org/en-US/docs/Web/API/FormData/append |
Any updates on this? |
As @kalaspuffar pointed out, filename can be passed as the third parameter to fileData.append("File1", file, "file.js"); |
@nickuraltsev's answer in #318 (comment) really helped me out. |
@ConAntonakos that is the solution to my problem. |
@ConAntonakos Would be great if you could share how you adjusted your code in the end. Working on passing data with .append now as well as it won't with my regular setup. |
tried doing something like
this returned an error from the server saying that there was no file sent. But...
vs jquery which worked and the file uploaded successfully.
The text was updated successfully, but these errors were encountered: