Small cleanup changes

This commit is contained in:
Fabian Würfl
2018-05-20 23:03:08 +02:00
parent 1e80ab2c0c
commit 983d3b5a11
2 changed files with 7 additions and 6 deletions

View File

@ -121,13 +121,13 @@ def upload():
targetdir = request.form['targetdir'].strip()
if targetdir == '':
targetdir = 'uploads/'
elif '..' in targetdir:
elif '../' in targetdir:
return redirect("./", code=406)
print('Uploading file:')
print('filename:', filename)
print('targetdir:', targetdir)
print('mimetype:', file.mimetype)
#print('Uploading file:')
#print('filename:', filename)
#print('targetdir:', targetdir)
#print('mimetype:', file.mimetype)
if "audio" in file.mimetype:
storagepath = os.path.abspath(os.path.join(var.music_folder, targetdir))