fix(storage): allow S3 without public_url, auto-construct path-style URL from endpoint
This commit is contained in:
@@ -120,7 +120,9 @@ class S3Storage:
|
||||
k = _strip_prefix(key)
|
||||
if self.public_url:
|
||||
return f"{self.public_url}/{k}"
|
||||
return k
|
||||
# fallback: path-style URL from endpoint + bucket
|
||||
ep = self._client._endpoint.host
|
||||
return f"{ep}/{self.bucket}/{k}"
|
||||
|
||||
|
||||
# ── Helpers ────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user