简体   繁体   English

Django Gunicorn Nginx summernote图片上传错误

[英]Django Gunicorn Nginx summernote image upload error

My problem我的问题

make blog by summernote用summernote制作博客

and use Nignx, Gunicorn并使用 Nignx、Gunicorn

but upload image use summernote但上传图片使用summernote

error code apear this错误代码出现这个

nginx_1  | 172.19.0.1 - - [14/Aug/2022:11:45:48 +0000] "POST /summernote/upload_attachment/ HTTP/1.1" 200 181 "http://127.0.0.1/summernote/editor/id_content/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" "-"
nginx_1  | 172.19.0.1 - - [14/Aug/2022:11:45:48 +0000] "GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1" 404 555 "http://127.0.0.1/summernote/editor/id_content/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" "-"
nginx_1  | 2022/08/14 11:45:48 [error] 22#22: *1 open() "/usr/src/app/_media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png" failed (2: No such file or directory), client: 172.19.0.1, server: , request: "GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1", host: "127.0.0.1", referrer: "http://127.0.0.1/summernote/editor/id_content/"

I want know meaning of this error message我想知道这个错误信息的含义

nginx_1  | 172.19.0.1 - - [14/Aug/2022:11:45:48 +0000] "GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1" 404 555 "http://127.0.0.1/summernote/editor/id_content/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" "-"

GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1" 404 GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1" 404

You have a 404 http error on the route you try to GET您尝试获取的路线上有404 http 错误

nginx_1  | 2022/08/14 11:45:48 [error] 22#22: *1 open() "/usr/src/app/_media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png" failed (2: No such file or directory), client: 172.19.0.1, server: , request: "GET /media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png HTTP/1.1", host: "127.0.0.1", referrer: "http://127.0.0.1/summernote/editor/id_content/"

open() "/usr/src/app/_media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png" failed (2: No such file or directory)打开()“/usr/src/app/_media/django-summernote/2022-08-14/76f471c6-b864-478a-a06b-4062b11c6ed8.png”失败(2:没有这样的文件或目录)

As the above error explicitly say you try to open a file that doesn't exist.由于上述错误明确表示您尝试打开一个不存在的文件。 This is the result of the HTTP response 404, you try to retrieve a file that doesn't exist (and maybe store it) and then open it.这是 HTTP 响应 404 的结果,您尝试检索一个不存在的文件(并可能存储它)然后打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM