feat: download - fase 01

This commit is contained in:
kodi
2026-03-14 12:31:11 +01:00
parent af1d1eea23
commit 610a648fd1
11 changed files with 182 additions and 0 deletions
+13
View File
@@ -61,6 +61,19 @@ async def info(
return service.info(path=path)
@router.get("/download")
async def download(
path: str,
service: FileOpsService = Depends(get_file_ops_service),
) -> StreamingResponse:
prepared = service.prepare_download(path=path)
return StreamingResponse(
prepared["content"],
headers=prepared["headers"],
media_type=prepared["content_type"],
)
@router.get("/video")
async def video(
path: str,