feat: add thumbnail generation for uploaded media files in image processing pipeline
This commit is contained in:
parent
2164cfc312
commit
baadf1f090
@ -281,7 +281,7 @@ async def handle_thumbnail(request: web.Request):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
return web.Response(status=404, text="File not found.")
|
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():
|
if not thumbnail_path.parent.exists():
|
||||||
thumbnail_path.parent.mkdir(exist_ok=True,parents=False)
|
thumbnail_path.parent.mkdir(exist_ok=True,parents=False)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user