Skip to content

Cloudflare R2 Integration (Pro)

High-performance storage with Cloudflare R2 integration

Included in the Pro version, Cloudflare R2 offers S3-compatible storage without egress fees. It’s the perfect solution for high-traffic applications needing fast, affordable, and reliable file delivery.

Setup Process

Cloudflare R2 Integration With Fluent Forms via Cloud Storage Manager

This guide will walk you through the entire process of setting up Cloudflare R2 to work with your forms. Follow the steps with screenshots below:

Getting Your Cloudflare Account ID

  1. Sign in to your Cloudflare Account.
  2. Navigate to R2 Object Storage > Overview in your Cloudflare dashboard.
  3. Click the API button and select Use R2 with APIs.

Cloudflare Account ID - Step 1

  1. A pop-up will appear showing your Account ID. Copy this ID for later use.

Cloudflare Account ID - Step 2

  1. Alternatively, you can find your Account ID in the URL of your Cloudflare account, as shown below:

Cloudflare Account ID - URL

Creating a Cloudflare R2 Bucket

  1. Navigate to R2 Object Storage from the left sidebar in your Cloudflare dashboard.
  2. Click on Overview under R2 Object Storage.
  3. Click the Create Bucket button.

Create Bucket Button

  1. Enter a unique name for your bucket.
  2. Leave the Location as Default unless you have specific storage requirements.
  3. Click the Create Bucket button.

Create Bucket Form

Setting Up Public Access (Bucket Public URL)

  1. On the Bucket Details page, scroll down to the R2.dev Subdomain section.
  2. Click the Allow Access button.
  3. Type "allow" in the confirmation field to grant access to the Public R2.dev Bucket URL.

Allow Access

  1. You'll now see your Cloudflare Bucket Public URL. Copy this URL for later use.

R2 Public URL

Creating API Access Keys

  1. Go to your Cloudflare account dashboard.
  2. Click on Manage R2 API Token.

Cloudflare Access Key - Step 1

  1. On the R2 page, click the Create API Token button.

Cloudflare Access Key - Step 2

  1. On the API creation page:
    • Give your API a descriptive Name
    • In the Permissions section, select Object Read and Write
    • Choose your previously created Bucket from the dropdown menu
    • Click the Create API Token button

Cloudflare Access Key - Step 3

  1. Copy both the Access Key and Secret Key immediately. Note that you won't be able to access these keys again later.

Cloudflare Access Key - Step 4

Configure Cloudflare R2 in Cloud Storage Manager

  1. Return to your Fluent Forms Dashboard, go to Global Settings, and click the Configurations button under the Cloud Storage Manager tab. Now, click on the Cloudflare R2 card.

Configure Cloudflare R2 in Cloud Storage Manager

  1. Click the Configuration Instructions tab to view the steps for integrating instructions for Cloudflare R2.

Configure Cloudflare R2 Instructions

  1. Enter the following credentials:
    • Cloudflare Account ID: The Account ID you copied earlier
    • Cloudflare Access Key: The Access Key from your API token
    • Cloudflare Secret Key: The Secret Key from your API token
    • Cloudflare Bucket Name: The name of the R2 bucket you created
    • Cloudflare Bucket Public URL: The R2.dev Public URL you copied earlier

Next, click Verify & Continue button to validate your credentials and establish a successful connection to Cloudflare R2.

Connect to Cloudflare R2

  1. Next configure Folder Configuration and Fluent Forms Settings. Follow the steps below:
Step 1:
  • Select the R2 Bucket Folders where your files will be stored in Cloudflare R2.
  • Configure the Custom Folder using custom naming (type any name) with dynamic shortcode (click in the right side folder icon to open the dynamic shortcode editor). This custom folder will be created under the selected R2 bucket folders in Cloudflare R2 and used to organize your uploaded files.
Step 2:
  • Under Fluent Forms Settings, select which form(s) you want to integrate with Cloudflare R2 (or tick the Enable for all Fluent Forms checkbox for all forms).
  • If you want to delete local files after uploading to Cloudflare R2, then tick the Auto-delete local files after uploading to Cloudflare R2 checkbox.
  • If you want to delete file from Cloudflare R2 when Fluent Forms form entry deleted, then tick the Auto-delete Cloudflare R2 files on form entry delete checkbox.
  1. Finally, click the Save & Active button to complete the setup.

Connect to Cloudflare R2

Configuration Options

Custom Folder Naming With ShortCodes

Recommended Folder Structure:

{form_title}/{submission.id}

Custom Folder Structure You can personalize your folder structure by using the following dynamic shortcodes:

  • {form_title} - Title of the form
  • {submission.id} - Submission ID
  • {date.Y-m-d} - Current date (Y-m-d)
  • {date.Y} - Current year (Y)
  • {date.m} - Current month (m)
  • {date.d} - Current day (d)
  • {user_id} - WordPress user ID (if logged in)

Pro Only

Cloudflare R2 integration requires the Pro version of Cloud Storage Manager. Upgrade to Pro to access this feature.

Released under the GPL v2 License.