今天碰到一个上传图片文件报500的服务器内部错误,首先想到是不是文件大小限制的问题,但是检查没有超过限制大小。
用的是move方法时,报的错。
通过在网上找答案,看到有这样一条回答,
I don't want to count all characters in the filename in the screenshot, but there could be an issue with the length of your file name. Wikipedia Filename - Length Restrictions
大意是,文件名字字符长度超出限制。
把图片文件名字改小后,500错误消失,貌似是问题根源,但是有些图片还会报500错误。
在此留个标记,希望可以找到问题的最终答案!