Added thumnails.
Some checks failed
RUpload build / Build (push) Has been cancelled

This commit is contained in:
retoor 2024-12-03 22:01:57 +01:00
parent f8ec8afce7
commit ee42c6b874

View File

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