mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 08:52:25 +00:00
fix(storage): ensure R2 public URL is saved to connection metadata
When saving an R2 storage connection, the "Prefix" input (which holds the Public Bucket URL) was not being mapped to `meta.baseDomain` or `meta.publicBaseUrl`. This caused `R2Service.ensureBucketConfigForNpub` to throw "Public Bucket URL is missing" during upload preparation, as it relies on these properties. This commit updates `ProfileModalController.handleSaveStorage` to correctly assign the prefix value to `baseDomain` and `publicBaseUrl` for the `cloudflare_r2` provider, aligning it with the behavior for generic S3 providers and resolving the upload error.
This commit is contained in:
1 parent
7f436c7b2d
commit
de03cd4c58
1 file changed
+3
@@ -9224,6 +9224,9 @@ export class ProfileModalController {
|
||||
// We can store it in meta if we want to show it in UI without decrypting.
|
||||
if (provider === "cloudflare_r2") {
|
||||
meta.accountId = endpointOrAccount;
|
||||
// For R2, the "Prefix" input serves as the Public Base URL (e.g. https://pub-xxx.r2.dev)
|
||||
meta.publicBaseUrl = prefix;
|
||||
meta.baseDomain = prefix;
|
||||
} else {
|
||||
meta.publicBaseUrl = publicBaseUrl;
|
||||
meta.baseDomain = publicBaseUrl;
|
||||
|
||||
Reference in new issue
Block a user