From ee42c6b87430bc0f9cf5a4c022c3584cc52b30b8 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 22:01:57 +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 2aaf321..6f11a49 100644 --- a/src/rupload/app.py +++ b/src/rupload/app.py @@ -271,7 +271,7 @@ async def handle_upload(request: web.Request): async def handle_thumbnail(request: web.Request): path = request.match_info["path"] - safe_path = pathlib.Path(request.app.upload_path).joinpath(pathlib.Path(path.name)) + safe_path = pathlib.Path(request.app.upload_path).joinpath(pathlib.Path(path).name) if not safe_path.is_file(): return web.Response(status=400, text="Invalid file type.")