Form data - start boundary issue
See original GitHub issueI’m trying to send the form data to the api, so appended the file to formData
formData.append('file', file.data, {filename: file.name});
and setting formData to axiosOptions.data for axios(axiosOption)
On not sending Content-type in headers, it is set to the default value application/x-www-form-urlencoded
.
If I send Content-type = multipart/form-data
with/without boundary appended, I get this error on the api which says that the start boundary wasn’t defined for the mime message.
As per all the docs and discussions of axios, content-type should have been set itself. But even when I set it explicitly, the above error occurs.
Any idea what I am missing?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (4 by maintainers)
Top Results From Across the Web
What is the boundary in multipart/form-data? - Stack Overflow
Great answer. A boundary is just the 'key' to separate the multiple "parts" of a multipart payload. Normally something like '&' is enough...
Read more >Understanding Boundary In Multipart/Form-Data - Roy Tutorials
Boundary in Form Data I am going to discuss here what is boundary in multipart/form-data which is mainly found for an input type...
Read more >How to change "multipart/form-data" boundary for an incoming ...
The article discusses the method to change the boundary of the "multipart/form-data" for an incoming HTTP request message.
Read more >Boundary delimiter for HTTP file posts is static. That is wrong ...
Boundary delimiter for HTTP file posts is static. That is wrong according to RFC.
Read more >Missing boundary in multipart/form-data POST - fetch - YouTube
JavaScript : fetch - Missing boundary in multipart/ form - data POST [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nickuraltsev
I get the exact same issue as @ronaldcurtis. I tried to make it work, but couldn’t. I always get the same results :
I tried multiple browsers :
And multiple Axios versions :
@ronaldcurtis Did you find any workaround ? @nickuraltsev Do you have any idea where it could come from ? I could look into it and try to solve this.
Nevermind - we found the issue was that we were passing in a header to our axios options and it was overriding the functionality built into Axios. This feature works and this issue should be closed.