mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Refine R2 upload UX with bucket auto-creation attempt and clearer guidance
- Updated `R2Service` to attempt bucket creation via S3 API (`ensureBucketExists`) before upload. This improves the UX for users with Admin keys or custom domains while gracefully failing (with a warning) for users with minimal permissions. - Modified `UploadModal` helper text to explicitly instruct users about enabling "Public Access" in the Cloudflare dashboard for new buckets. - Updated `js/r2.js` to ensure the "Public Bucket URL" is always sanitized to include the `https://` protocol, fixing potential webseed generation issues.
This commit is contained in:
1 parent
7dc2977cf2
commit
f45f027a56
2 files changed
+24
-8
No files matched your search
@@ -164,6 +164,9 @@
|
||||
<div class="space-y-1">
|
||||
<label for="input-r2-domain" class="text-xs font-medium text-text">Public Bucket URL</label>
|
||||
<input id="input-r2-domain" type="text" class="input text-xs" placeholder="https://pub-xxx.r2.dev" />
|
||||
<p class="text-[10px] text-muted leading-tight">
|
||||
New buckets are private. Enable <strong>Public Access</strong> in the Cloudflare dashboard to get your r2.dev URL.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid gap-3 md:grid-cols-2">
|
||||
|
||||
Reference in new issue
Block a user