413 Request Entity Too Large
这个是因为nginx默认上传文件的大小限制在1M,解决方法:
1.打开配置文件nginx.conf
2.在http{}中加入client_max_body_size 50m
3.保存后重启nginx或重新加载配置文件。
The field file exceeds its maximum permitted size of 1048576 bytes
这个错误原因:SpringBoot内嵌的 tomcat 默认的所有上传的文件大小为 1MB
解决方法:
修改配置文件
Spring Boot 1.3.x或者之前
multipart.maxFileSize=100Mb multipart.maxRequestSize=1000Mb
Spring Boot 1.4.x或者之后
spring.http.multipart.maxFileSize=100Mb spring.http.multipart.maxRequestSize=1000Mb