From 2eafbbd82f4e493fcfaaebf75127e82a880d7dba Mon Sep 17 00:00:00 2001 From: Ana Custura Date: Fri, 3 Apr 2026 16:44:27 +0100 Subject: [PATCH] Speedy hack to make HTML files display, will need a more robust solution later --- app/routes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index d0bfa3b..cd7926e 100644 --- a/app/routes.py +++ b/app/routes.py @@ -140,10 +140,9 @@ def files(path): @app.route('/serve_file/') def serve_file(filepath): - full_path = os.path.realpath(filepath) if not filepath.startswith(app.config["BUTTERBOX_USB_PATH"]): redirect(url_for('files', path="")) - return send_file(full_path) + return send_file("/" + filepath) @app.route('/login', methods=['GET', 'POST']) def login():