From 7e32fa1311793d21ed291891e6d90fe7f76fe0bd Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 8 Jan 2022 21:21:29 +0100 Subject: [PATCH] WebHost: fix uploading .archipelago files --- WebHostLib/upload.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WebHostLib/upload.py b/WebHostLib/upload.py index 607b0affef..d1911a9278 100644 --- a/WebHostLib/upload.py +++ b/WebHostLib/upload.py @@ -108,12 +108,13 @@ def uploads(): elif res: return redirect(url_for("view_seed", seed=res.id)) else: + file.seek(0) # offset from is_zipfile check # noinspection PyBroadException try: multidata = file.read() MultiServer.Context.decompress(multidata) - except: - flash("Could not load multidata. File may be corrupted or incompatible.") + except Exception as e: + flash(f"Could not load multidata. File may be corrupted or incompatible. ({e})") else: seed = Seed(multidata=multidata, owner=session["_id"]) flush() # place into DB and generate ids