feat: pdf viewer toegevoegd

This commit is contained in:
kodi
2026-03-12 15:08:30 +01:00
parent ed34d6202f
commit fc22550e91
12 changed files with 382 additions and 1 deletions
+13
View File
@@ -66,6 +66,19 @@ async def video(
)
@router.get("/pdf")
async def pdf(
path: str,
service: FileOpsService = Depends(get_file_ops_service),
) -> StreamingResponse:
prepared = service.prepare_pdf_stream(path=path)
return StreamingResponse(
prepared["content"],
headers=prepared["headers"],
media_type=prepared["content_type"],
)
@router.get("/thumbnail")
async def thumbnail(
path: str,