From 38a407c69b0ff0b7d2ced46ef1dc320fca8beff5 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 26 Jan 2026 07:23:49 -0500 Subject: [PATCH] docs: clarify R2 bucket naming and CORS scope --- docs/storage-r2.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/storage-r2.md b/docs/storage-r2.md index 6381e226..876216db 100644 --- a/docs/storage-r2.md +++ b/docs/storage-r2.md @@ -33,11 +33,13 @@ To enable R2 uploads, you must provide Cloudflare S3-compatible credentials and ### Step 1: Create Bucket & Enable Public Access 1. Log in to the **Cloudflare Dashboard**. 2. Navigate to **R2** -> **Create Bucket**. -3. In the bucket settings, enable **Public Access** (R2.dev subdomain) or connect a custom domain. -4. Copy the **Public Bucket URL** (e.g., `https://pub-xxxxxx.r2.dev`). +3. **Use the exact bucket name derived by the app.** bitvid derives the bucket name from your npub (sanitized), and the bucket configured in Cloudflare **must exactly match** what the app expects. If the app logs show `bucketName: 'npub1qxduthz4p8v5zsu-ftrlaz'`, create/configure that exact bucket name in Cloudflare and paste it into the dashboard before moving on. +4. In the bucket settings, enable **Public Access** (R2.dev subdomain) or connect a custom domain. +5. Copy the **Public Bucket URL** (e.g., `https://pub-xxxxxx.r2.dev`). ### Step 2: Configure CORS Manually add a CORS policy in the bucket settings to allow uploads from your app's origin (or `*`). +(CORS must be configured on the **S3 API endpoint bucket**, not the public URL domain.) (See `content/upload-content.md` for the recommended JSON configuration). ### Step 3: Create S3 Credentials