Current request is not a multipart request、
时间: 2023-08-27 17:15:19 浏览: 121
回答: 当你在使用SpringBoot的controller处理带有上传文件的服务时,可能会遇到"Current request is not a multipart request"的报错。这个错误一般发生在请求不是多部分请求时,比如没有正确设置请求头的Content-Type为"multipart/form-data"。 这个错误可以通过以下几种方式解决:
1. 确保你的请求头中设置了正确的Content-Type为"multipart/form-data"。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [错误记录:Current request is not a multipart request](https://blog.csdn.net/java_zhangshuai/article/details/107785337)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [postman错误提示“Current request is not a multipart request”](https://blog.csdn.net/xiaoheihai666/article/details/127751018)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文