diff --git a/features/doc-service/app/routers/documents.py b/features/doc-service/app/routers/documents.py index fd54855..9e4f797 100644 --- a/features/doc-service/app/routers/documents.py +++ b/features/doc-service/app/routers/documents.py @@ -29,7 +29,7 @@ from app.schemas.document import ( from app.schemas.share import DocumentShareCreate, DocumentShareOut, SharedDocumentOut from app.services.ai_client import AIServiceError, classify_document from app.services.config_reader import load_doc_config -from app.services.storage import delete_file, download_file, save_upload +from app.services.storage import delete_file, download_file as storage_download, save_upload router = APIRouter() @@ -146,7 +146,7 @@ async def process_document(doc_id: str) -> None: await db.commit() try: - pdf_bytes = await download_file(doc.storage_key) + pdf_bytes = await storage_download(doc.storage_key) text = await asyncio.to_thread(_extract_pdf_text, pdf_bytes) result = await classify_document(text) @@ -611,7 +611,7 @@ async def download_file( raise HTTPException(status_code=404, detail="Document not found") try: - pdf_bytes = await download_file(doc.storage_key) + pdf_bytes = await storage_download(doc.storage_key) except FileNotFoundError: raise HTTPException(status_code=404, detail="File not found in storage")