如果使用jQuery的ajax上传大文件报以下错误500或者413最大可能是后端服务崩掉了,大家可以排查一下,加断点或者查看日志,确认问题出在哪里,也可以先试一下我踩坑的解决办法
Failed to load resource: the server responded with a status of 500 (Internal
或者
Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
修改PHP.ini
1、设置PHP代码执行时间,最大30s,0代表不限制
max_execution_time = 6000
2、设置限制 PHP 进程的内存使用
memory_limit = 1280M
3、设置上传文件限制大小
upload_max_filesize = 2048M
修改以上操作,问题应该就解决了,如果还是不行,可以进一步查看日志,确认问题点