Fix minio localhost public URL by proxying through backend
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user