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
Cannot upload file within FormData #4412
Comments
It could be useful to update the release notes of 0.25.0 with this breaking change (or bug). Took me a while to track it down |
I downgrade to 0.24.0 because of this. |
This issue appeared after this change: https://github.com/axios/axios/pull/3342/files#diff-5dfe38baf287dcf756a17c2dd63483781b53bf4b669e10efdd01e74bcd8e780aR57 As was said above, it is because I managed to fix it without downgrading by adding this to the beginning of the index file in the app:
|
Why are these kind of useless "optimizations" even done? Why change something that works? Nobody will see any speed improvement. |
Clean code is always easier to read. True reason this to get master is either
|
Closed I will be releasing the fix tonight |
2 days have passed... |
using 0.26 and still not working. 12 days have passed... mlazari tks for the workaround |
#4406 (comment) <-- this comment worked for me on both 0.25 and 0.26 |
I can confirm that 0.26.0 does not fix the bug. |
I still have this bug with 0.26 |
is 0.24 working? |
It is for me. |
Does anybody want to try to put in a pull request for this, it would be greatly appreciated. |
it is work for me |
Same issue with |
Your code
Is not done as it is documented. From Axios Readme https://github.com/axios/axios And here is the implementation of It is also setting the boundary
I suggest first fixing the form-data usage to use |
I don't think you read manual carefully. Also why do I need form-data if only axios should be enough? So I assume your suggestion is wrong. |
This works perfectly well in Axios 0.24.0, so no excuse to not fix the bug. The solution definitely cannot be to include some additional dependency and add parameters to post call. |
I'm having the same issue but only when using Android browser. iOS seems to work fine. I downgraded to 0.24.0 as suggested in comments above but I'm having the same issue. I just see a failed network request. I can't believe this is still not fixed. Can anyone help me? I'm using Vue.js |
If it does not work for you using Axios 0.24.0, then probably you have different problem than this one. |
still issue use 0.26.1 |
@edritech93 but I'm still seeing this issue on 0.26.1... unless you mean it is still an issue ON 0.26.1? |
FormData file upload is working in 0.27.2 and 0.22.0. |
Please upgrade to 0.27.2 |
Adding a note here on my previous comment #4412 (comment) that might be useful for someone. |
Describe the bug
After upgrading from 0.24.0 to 0.25.0 File Form upload breaks.
To Reproduce
Original working on 0.24.0 code.
This code was working previously, but now backend cannot extract file field.
After specifying content type:
I got an error on backend "bad content-type header, no multipart boundary"
Expected behavior
Seems like previous version of axios (0.24.0) automatically add correct header and also boundary.
Or was there any breaking change that I didn't notice?
Environment
Additional context/Screenshots
Not needed.
The text was updated successfully, but these errors were encountered: