much better

This commit is contained in:
piair 2023-08-21 20:58:26 +02:00
parent 9b411fe54e
commit 8d7a474c69
1 changed files with 4 additions and 4 deletions

View File

@ -425,17 +425,17 @@ def upload_file():
# check if the post request has the file part
if 'file1' not in request.files:
print('No file part')
#return redirect(url_for('settings_get'))
file = request.files['file']
return redirect(url_for('settings_get'))
file = request.files['file1']
# 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(url_for('settings_get'))
return redirect(url_for('settings_get'))
if file and allowed_file(file.filename):
filename = secure_filename(file.filename)
file.save(os.path.join('/app/MsRewards-Reborn/user_data/', filename))
#return redirect(url_for('settings_get'))
return redirect(url_for('settings_get'))
def maxi(dict):