Fix minio localhost public URL by proxying through backend

This commit is contained in:
2026-09-25 17:54:33 +05:30
parent 9dd0601a22
commit ed1084bd8d
2 changed files with 14 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ def upload_file(file_content: bytes, object_name: str, content_type: str = "appl
# Construct public URL (from browser's point of view, it connects to localhost:9000)
# We can resolve this dynamically by returning a path like /api/uploads/ or direct localhost:9000 link
public_url = f"http://localhost:9000/{MINIO_BUCKET}/{object_name}"
public_url = f"/api/storage/{MINIO_BUCKET}/{object_name}"
logger.info(f"Successfully uploaded {object_name} to Minio. URL: {public_url}")
return public_url
except Exception as e: