文件上传报错:Current request is not a multipart request
来源:互联网 发布:子域名 二级域名 编辑:程序博客网 时间:2024/06/03 15:18
"error": "Internal Server Error",
"exception": "org.springframework.web.multipart.MultipartException",
"message": "Current request is not a multipart request", "path": "/upload"
错误原因:Headers填写错误,估计是之前选错了x-www-form-urlencoded
由于上传文件用的Content-Type应该是multipart/form-data,修改之后依然报错。
"error": "Internal Server Error",
"exception": "org.springframework.web.multipart.MultipartException",
"message": "Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found",
"path": "/upload"
解析之后发现Content-Type实际用的是text/plain。但是这么输入依然报相同错误。
多次试验之后发现,Content-Type无论选择什么,都会报错。正确的做法是删除Content-Type就行了。
- springMVC上传文件报错:The current request is not a multipart request
- 文件上传报错:Current request is not a multipart request
- 上传文件报错:The current request is not a multipart request] with root cause
- Spring mvc 上传文件,报The current request is not a multipart request
- 使用表单在springMVC的后台上传文件时遇到500错误:The current request is not a multipart request
- The current request is not a multipart request
- The current request is not a multipart request异常
- Spring mvc 上传图片遇到The current request is not a multipart request的问题
- form表单已经加了enctype,但是eclipse报错提示:The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- 非常牛叉的楼主,自己的问题其实就是答案--用springmvc上传文件时报The current request is not a multipart request异常
- [转]非常牛叉的楼主,自己的问题其实就是答案--用springmvc上传文件时报The current request is not a multipart request异常
- SQL常用指令
- 解决Attempt to invoke virtual method'boolean java.lang.String.equals(java.lang.Object)'...
- 单例模式的各种姿势
- 二分查找and快速排序
- 深度残差网络<3>
- 文件上传报错:Current request is not a multipart request
- Java-读取某个目录下所有文件、文件夹和3种从文件路径中获取文件名的方法
- Linux下Tomcat的安装和使用
- Oracle当"sqlplus / as sysdba"登录不了数据库问题场景1
- AngularJS压缩JS技巧分析
- github Tags和Branch分支相关操作(三)
- jQuery基础01体验
- 《FreeSWITCH: VoIP实战》:FreeSWITCH 架构
- qt(c++)之 工厂方法模式