forked from piair/MsRewards-Reborn
logik en fait
This commit is contained in:
parent
8444fdbb2d
commit
8f5a1ac705
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user