The front end uses httpclient in the angular library to upload files and set
headers: { ‘Content-Type’: ‘multipart/form-data’ }
When the backend uses featurejs to receive, an error is reported
error: multipart: boundary not found
error reason: multipart does not find the boundary
The uploaded file is a form in multipart/form data format of post request
content-type: multipart/form-data is not followed by the boundary
To sum up, the request header was set many times, overwriting the original form enctype = “multipart/form data”
Conclusion: it is not necessary to set content type: Music/form data
repeatedly, otherwise the original may be overwritten and unexpected errors may be caused.
Correct way to get headers:
When uploading formdata type data, you do not need to manually set content type
browser performance:
it’s done!
Read More:
- [Solved] node.js Upload Files Error: Multipart: boundary not found multer
- React error boundary (What You Should Know & How to Solve)
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtim
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Solved] node-xlsx Write excel Error: TypeError: n.indexOf is not a function
- [Solved] Error: Node Sass does not yet support your current environment
- Vue Project Error: Expected indentation of 2 spaces but found 4,Newline required at end of file but not found
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment:
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported archi
- [Solved] Failed to load resource: net::ERR_FILE_NOT_FOUND
- [Solved] Vue E-Charts Error: These dependencies were not found:
- Vue Dynamic Display Picture Error 404: Not Found [How to Solve]
- [Weex]Error in creating project NPM: unable to load file D:\program files\nodejs\node_ global\ weex.ps1 Because scripts are not allowed to run on this system.
- Vue Startup Error: 98% after emitting CopyPlugin This dependency was not found:
- Vue-echarts error: was not found in vue-demi [How to Solve]
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] Vue Import swiper.css Error: Module not found…