Added thumnails.

This commit is contained in:
retoor 2024-12-03 21:50:16 +01:00
parent c9f3f74dc9
commit d388537fb5

View File

@ -271,7 +271,7 @@ async def handle_upload(request: web.Request):
async def handle_thumbnail(request: web.Request): async def handle_thumbnail(request: web.Request):
path = request.match_info["path"] path = request.match_info["path"]
safe_path = pathlib.Path(request.app.upload_path).joinpath(path) safe_path = pathlib.Path(path)
if not safe_path.exists(): if not safe_path.exists():
return web.Response(status=404, text="File not found.") return web.Response(status=404, text="File not found.")