参考: Nginx出现500 Internal Server Error 错误的解决方案
原因1:
我要实现接收图片并保存在项目的 static/images/ 目录下,我在代码有这两句:
file_path = os.path.join('./static/images', filename)
upload_file.save(file_path)
但是我没有在 static/ 下建立 images/ 文件夹,所有报500错误
解决方法就是在手动在 static/ 下建立 images/ 文件夹。
原因2: