文件上传报错:Current request is not a multipart request
2018-01-19 12:23
1201 查看
“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就行了。
“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的后台上传文件时遇到500错误: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异常
- Spring mvc 上传文件,报The current request is not a multipart request
- 文件上传报错: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的问题
- 在使用springmvc上传图片 The current request is not a multipart request 错误
- 在使用springmvc上传图片时碰到的 The current request is not a multipart request问题
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- 遇到问题-----uploadify上传文件ServletFileUpload.isMultipartContent(request)为false
- The current request is not a multipart request异常
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request
- 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_文件上传_错误_Required CommonsMultipartFile parameter 'file' is not present
- SpringMVC异常:org.springframework.web.multipart.MultipartException: The current request is not a multi
- MultipartFile文件上传,400 - Required MultipartFile parameter 'file' is not present
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request