fix: correct thumbnail path resolution to use request.app instead of app in handle_thumbnail

This commit is contained in:
retoor 2024-12-03 20:59:06 +00:00
parent 05b70cf94e
commit 0516bd4a5f

View File

@ -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)