MARKETPLACE
PLUGINS
CLOUDFLARE R2 FILE STORAGE
Cloudflare R2 file storage logo

Cloudflare R2 file storage

Published November 2026
   •    Updated this week

Plugin details

Store your app's files in your own Cloudflare R2 bucket instead of Bubble file storage. Files upload straight from the visitor's browser to R2, so large files do not pass through your app or use workload on the transfer.
What is included:
- R2 Uploader element: drag and drop or click to browse, progress bar, file type and size limits, single or multiple files
- Create upload URL (server-side action): signs a short-lived upload link with your secret key, which never reaches the browser
- Create download URL (server-side action): time-limited links for private files
- Delete file (server-side action)
- Works with public buckets (custom domain) and private buckets
- Supports R2 jurisdictions such as EU

How it works: the uploader tells your workflow a file was chosen, your workflow asks the server-side action for an upload link, and the uploader sends the file to R2. You decide who may upload by putting your own conditions on that workflow.

Good to know:
- You need a Cloudflare account with R2 enabled and an R2 API token. Cloudflare bills R2 usage to your account.
- Files upload in a single request (R2 allows up to about 5 GB per request). Multipart upload is not included.
- File type and size limits are checked in the browser.
- No tracking, analytics, cookies or third-party scripts. The plugin talks only to your own R2 bucket.
- No extra plugins or npm packages required.

This is an independent plugin. It is not affiliated with, sponsored by or endorsed by Cloudflare. Cloudflare and R2 are trademarks of Cloudflare, Inc.

Support: Hello@redcenterstudio.com

$39

One time  •  Or  $6/mo

stars   •   0 ratings
0 installs  
This plugin does not collect or track your personal data.

Platform

Web

Contributor details

RedCenter Studio logo
RedCenter Studio
Joined 2026   •   2 Plugins
View contributor profile

Instructions

1. CLOUDFLARE SETUP a) In the Cloudflare dashboard open R2 and create a bucket.
b) R2 > Manage API tokens > Create token. Permission: Object Read & Write. Limit it to your bucket. Copy the Access Key ID and Secret Access Key.
c) Copy your Account ID (shown on the R2 overview page).
d) Bucket > Settings > CORS policy. Paste this, using your own app addresses (include your bubbleapps.io address for testing):
[
 {
   "AllowedOrigins": ["https://yourapp.bubbleapps.io", "https://www.yourdomain.com"],
   "AllowedMethods": ["PUT", "GET"],
   "AllowedHeaders": ["content-type"],
   "MaxAgeSeconds": 3600
 }
]
e) Optional, for public files: Bucket > Settings > connect a custom domain (for example files.yourdomain.com).

2. PLUGIN KEYS (Plugins tab)
- Account ID
- Access Key ID
- Secret Access Key
- Bucket name
- Public base URL: optional. Your public bucket address, for example https://files.yourdomain.com. Leave empty for private buckets.
- Jurisdiction: optional. Leave empty, or enter eu if your bucket was created in the EU jurisdiction.

3. UPLOAD WORKFLOW
a) Place the R2 Uploader element on your page.
b) Add a workflow: When R2 Uploader A File selected
  Step 1: Create R2 upload URL
          File name = R2 Uploader A's File name
          Content type = R2 Uploader A's File type
          Folder = optional, for example Current User's unique id
  Step 2: Upload to URL (R2 Uploader A)
          Upload URL = Result of step 1's upload_url
          File key = Result of step 1's file_key
          Public URL = Result of step 1's public_url
c) Add a workflow: When R2 Uploader A Upload complete
  Save R2 Uploader A's File key (and File URL for public buckets) to your database.
d) Optional: When R2 Uploader A Upload failed or File rejected, show R2 Uploader A's Error message.

With "Allow multiple files" ticked, the same workflows run once per file, one after another.

4. PRIVATE FILES
Use Create R2 download URL with the saved File key to get a link that expires. Generate it when the user clicks download, not on page load.

5. DELETING
Use Delete R2 file with the saved File key.

6. SECURITY
Anyone who can trigger your upload workflow can upload to your bucket. Add "Only when" conditions (for example Current User is logged in) to the File selected workflow, and never run Delete R2 file with a key taken straight from user input without checking the file belongs to that user.

TROUBLESHOOTING
- "Upload blocked": the bucket CORS policy does not list the address you are on, or PUT is missing.
- "Upload refused (403)": the keys are wrong, the token cannot write to this bucket, the link expired, or Content type in step 1 was not set to the uploader's File type.

Types

This plugin can be found under the following types:
Element   •   Event   •   Action

Categories

This plugin can be found under the following categories:
Media   •   Image   •   Technical   •   Data (things)   •   Visual Elements

Resources

Support contact
Documentation
Tutorial

Rating and reviews

No reviews yet

This plugin has not received any reviews.
Bubble