springboot 上传解决 413 Request Entity Too Large
springboot上传文件出现问题 413 Request Entity Too Large.debug查看上传文件的body大小,Content-Length后面就是。修改后端配置参数,举例是允许最大500M上传。spring:servlet:multipart:max-file-size: 5120MBmax-request-size: 5120MB前端如果是nginx做的转发,也要处理。n
·
springboot上传文件出现问题 413 Request Entity Too Large.
debug查看上传文件的body大小,Content-Length后面就是。

修改后端配置参数,举例是允许最大500M上传。
spring:
servlet:
multipart:
max-file-size: 5120MB
max-request-size: 5120MB

前端如果是nginx做的转发,也要处理。nginx默认上传是1M,修改配置文件。
在http{}中加入 client_max_body_size 500m;
然后重启nginx.
更多推荐



所有评论(0)