原文:记一次ElementUI上传文件,Current request is not a multipart request与the request was rejected because no multipart boundary was found

.前端代码 ElementUI .后端代码 Spirngboot 上传代码中不要设置请求头 Axios检测到当前请求是formData请求时会删掉Content Type,如果自己加这个的话会报the request was rejected because no multipart boundary was found错误 原因是:不加的话浏览器自动处理表单请求 请求头是这样的 加的话 后端加 ...

2022-03-10 17:51 0 1143 推荐指数:

查看详情

Current request is not a multipart request

1. 文件上传需要在form表单中添加<form enctype="multipart/form-data"> 2. SpringMVC默认是关闭fileupload功能的,开启该能够并验证文件上传:   需要在applicationcotent.xml中做如下配置 ...

Thu Jul 27 06:25:00 CST 2017 0 12970
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM