mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Fix
This commit is contained in:
@@ -67,7 +67,7 @@ async def download_cached_file(request: Request, object_id: int, object_type: st
|
||||
)
|
||||
|
||||
if data is None:
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
|
||||
raise HTTPException(status_code=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
response, client = data
|
||||
|
||||
@@ -75,6 +75,8 @@ async def download_cached_file(request: Request, object_id: int, object_type: st
|
||||
await response.aclose()
|
||||
await client.aclose()
|
||||
|
||||
assert book
|
||||
|
||||
return StreamingResponse(
|
||||
response.aiter_bytes(),
|
||||
headers={
|
||||
|
||||
Reference in New Issue
Block a user