【概要】Flaskで、WEB上からアップロードされた画像を保存することが出来ないというものです。
【エラー内容】
①ローカルにて、image.jpgをアップロードしてみた結果。画像は保存すらされていません。
File "C:\Users\○○○\anaconda3\lib\site-packages\werkzeug\datastructures.py", line 3021, in save
dst = open(dst, "wb")
FileNotFoundError: [Errno 2] No such file or directory: './static/image/image.jpg'
127.0.0.1 - - [28/Nov/2021 20:55:28] "POST /upload/ HTTP/1.1" 500 -
②ちなみに、アップロード後に送信ボタンを押すと、Web上には下記のように表示されます。
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
タブには、500Internal Server Errorと表示されます。