syntax error,except start with { or [,but actually start with error’, data=null}

HTTP请求后返回结果,出现syntax error,except start with { or [,but actually start with error', data=null}

经过查看,发现返回Result为:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

问题: Nginx默认最大能够上传1MB文件,上传的文件超过1M
解决方案
修改nginx.conf配置文件,在http{}中加入 client_max_body_size 10m;
然后重启nginx
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐