From ddf258db57682cb01b689245510c7865752d51de Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Tue, 28 Feb 2023 22:46:52 -0800 Subject: [PATCH] Fix bugs in the upload to images form (#1111) * Fix formatting of the image subdir list for uploading * Fix upload path --- python/web/src/templates/upload.html | 5 +---- python/web/src/web.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python/web/src/templates/upload.html b/python/web/src/templates/upload.html index 9a8df9e8..11c269b5 100644 --- a/python/web/src/templates/upload.html +++ b/python/web/src/templates/upload.html @@ -15,11 +15,8 @@ diff --git a/python/web/src/web.py b/python/web/src/web.py index f7b09148..0e15fd59 100644 --- a/python/web/src/web.py +++ b/python/web/src/web.py @@ -990,7 +990,7 @@ def upload_file(): return make_response(auth["msg"], 403) destination = request.form.get("destination") - subdir = request.form.get("subdir") + subdir = request.form.get("subdir").replace("images/", "", 1) if destination == "disk_images": safe_path = is_safe_path(Path(subdir)) if not safe_path["status"]: