Skip to content

Commit f99859c

Browse files
committed
rebase
1 parent 3de3e70 commit f99859c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/server/routers/ingest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Ingest endpoint for the API."""
22

3+
import logging
34
from typing import Union
45
from 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)
98101
async 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

0 commit comments

Comments
 (0)