fix(storage): allow S3 without public_url, auto-construct path-style URL from endpoint

This commit is contained in:
earthjasonlin committed 2026-07-18 08:17:35 +08:00
1 parent 4787fdbf22
commit 54d778971d
2 files changed
+3 -22

No files matched your search

+3 -1
View File
@@ -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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.