create folder if not exist

This commit is contained in:
dechert
2021-06-16 19:32:58 +02:00
parent 53f40ef725
commit 8fec12133b
2 changed files with 9 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ def upload_image():
from werkzeug.utils import secure_filename
filename = secure_filename(csv_file.filename)
output_file_path = os.path.join(UPLOAD_FODLER, filename)
if not os.path.exists(UPLOAD_FODLER):
os.makedirs(UPLOAD_FODLER)
csv_file.save(output_file_path)
# run converter