From 8f5a1ac70544747f299cf83e7c0b36897844c2b7 Mon Sep 17 00:00:00 2001 From: piair Date: Mon, 21 Aug 2023 20:44:48 +0200 Subject: [PATCH] logik en fait --- Flask/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flask/app.py b/Flask/app.py index 0d8ccff..c332fef 100644 --- a/Flask/app.py +++ b/Flask/app.py @@ -424,13 +424,13 @@ def upload_file(): # check if the post request has the file part if 'file' not in request.files: print('No file part') - return redirect(request.url) + return redirect('settings') file = request.files['file'] # If the user does not select a file, the browser submits an # empty file without a filename. if file.filename == '': print('No selected file') - return redirect(request.url) + return redirect('settings') if file and allowed_file(file.filename): filename = secure_filename(file.filename) file.save(os.path.join('/app/MsRewards-Reborn/user_data/', filename))