File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11"""Ingest endpoint for the API."""
22
3+ import logging
34from typing import Union
45from uuid import UUID
56
@@ -94,6 +95,8 @@ async def api_ingest_get(
9495 return response
9596
9697
98+ logger = logging .getLogger (__name__ )
99+
97100@router .get ("/api/download/file/{ingest_id}" , response_model = None )
98101async def download_ingest (
99102 ingest_id : UUID ,
@@ -120,9 +123,12 @@ async def download_ingest(
120123
121124 """
122125 # Check if S3 is enabled and file exists in S3
126+ logger .info (f"Checking if S3 is enabled and file exists in S3 for ingest ID: { ingest_id } " )
123127 if is_s3_enabled ():
128+ logger .info (f"S3 is enabled, checking if file exists in S3 for ingest ID: { ingest_id } " )
124129 s3_url = get_s3_url_for_ingest_id (ingest_id )
125130 if s3_url :
131+ logger .info (f"File exists in S3, redirecting to S3 URL: { s3_url } " )
126132 return RedirectResponse (url = s3_url , status_code = 302 )
127133
128134 # Fall back to local file serving
You can’t perform that action at this time.
0 commit comments