From 58662fa7a88d4cde59c53cdd0a592694444b10e0 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 21:59:06 +0100 Subject: [PATCH] Added thumnails. --- src/rupload/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rupload/app.py b/src/rupload/app.py index b66d726..1bfce5c 100644 --- a/src/rupload/app.py +++ b/src/rupload/app.py @@ -281,7 +281,7 @@ async def handle_thumbnail(request: web.Request): except ValueError: return web.Response(status=404, text="File not found.") - thumbnail_path = pathlib.Path(app.upload_path).joinpath(".thumbnail").joinpath(safe_path.name) + thumbnail_path = pathlib.Path(request.app.upload_path).joinpath(".thumbnail").joinpath(safe_path.name) if not thumbnail_path.parent.exists(): thumbnail_path.parent.mkdir(exist_ok=True,parents=False)