WebHost: fix is_zipfile check for flask FileStorage objects

- and assorted cleanup
This commit is contained in:
Fabian Dill
2022-01-06 06:09:15 +01:00
parent a6a9989fcf
commit 80b3a5b1d4
7 changed files with 15 additions and 17 deletions

View File

@@ -100,7 +100,7 @@ def uploads():
if file.filename == '':
flash('No selected file')
elif file and allowed_file(file.filename):
if zipfile.is_zipfile(file.filename):
if zipfile.is_zipfile(file):
with zipfile.ZipFile(file, 'r') as zfile:
res = upload_zip_to_db(zfile)
if type(res) == str: