mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
- Create `assets/svg/upload-content-icon.svg` - Create `content/upload-content.md` with Cloudflare R2 setup instructions - Create `views/upload-content.html` to render the guide - Add "Learn How" link to `components/upload-modal.html` in the R2 credentials section
2.1 KiB
2.1 KiB
How to Upload Content
bitvid is a decentralized platform, but for larger video files, we currently support Cloudflare R2 as a storage backend. This allows you to upload files directly from your browser to a high-performance, affordable storage bucket.
Prerequisites
- A Cloudflare Account (free to create).
- An activated R2 Plan (there is a generous free tier, but you may need to add a payment method).
Step-by-Step Guide
1. Create an API Token
To let bitvid upload files to your bucket, you need an API Token with permission to edit R2 storage.
- Log in to your Cloudflare Dashboard.
- Navigate to R2 in the sidebar.
- On the right side of the R2 Overview page, look for "Manage R2 API Tokens" and click it.
- Click the "Create API Token" button.
- Configure the token:
- Token name: Enter something recognizable, e.g., "bitvid-upload".
- Permissions: Select "Admin Read & Write" (easiest) or select the specific "Workers R2 Storage" permission with "Edit" access.
- Specific Bucket(s): You can grant access to "All buckets" or a specific one if you already created it.
- TTL: Set this to "Forever" or a duration of your choice.
- Click "Create API Token".
2. Copy Your Credentials
Once created, you will see your credentials. Do not close this page yet! You cannot see the Secret Access Key again.
Copy the following values:
- Access Key ID: Usually starts with a random string.
- Secret Access Key: A long string of characters (this is your password).
- Account ID: This is found in the URL of your dashboard or on the R2 Overview page (e.g.,
https://dash.cloudflare.com/<ACCOUNT_ID>/r2).
3. Configure bitvid
- Return to the Upload Video modal in bitvid.
- Click "Configure R2 Storage".
- Enter your Account ID, Access Key ID, and Secret Access Key.
- Click "Save Credentials".
bitvid will automatically attempt to create a private bucket for your videos if one doesn't exist, or you can use the "Advanced Options" to specify a custom bucket or domain.