FileUploadBase$FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes
时间: 2023-12-17 08:00:31 浏览: 147
附件大小超过了允许的范围
FileUploadBase$FileSizeLimitExceededException是一个异常,它表示上传的文件大小超过了允许的最大大小。在这个特定的异常中,上传的文件大小超过了1048576字节(1MB)。
该异常通常会与文件上传相关的框架或库一起使用,如Apache Tomcat的文件上传组件或Spring框架的Multipart组件。当文件上传的大小超过配置的最大限制时,这个异常会被抛出。
在Spring框架中,你可以通过设置spring.http.multipart.maxFileSize属性来配置允许的最大文件大小。默认情况下,这个属性被设置为10MB。如果要修改最大文件大小,你可以在配置文件中设置该属性的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes.](https://blog.csdn.net/weixin_64061088/article/details/129297518)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [spring boot上传附件报错:org.apache.tomcat.util.http.fileupload.FileUploadBase$...](https://blog.csdn.net/fxj0720/article/details/80255651)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文