Summary
This page allows you to set up and manage your own S3-compatible storage for files. You can choose from various predefined providers or use a custom S3 service, provide your access details, and verify the connection and permissions. Properly configuring your S3 storage enables direct and unlimited file uploads and downloads within the application.
Page Access
You can access this page by navigating to: /user_s3
Page Functionalities
- Enable/Disable Switch: Allows you to turn on or off the use of your own S3-compatible storage.
- Select S3 Provider Dropdown: Choose from a list of popular S3 providers (AWS S3, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, IONOS S3) or select 'Custom URL' if your provider is not listed.
- Cloudflare Account ID Field: (Appears if 'Cloudflare R2' is selected) Enter your Cloudflare Account ID here. The S3 URL will be automatically generated.
- DigitalOcean Region Dropdown: (Appears if 'DigitalOcean Spaces' is selected) Select the region for your DigitalOcean Space. The S3 URL will be automatically generated.
- Backblaze B2 Endpoint Field: (Appears if 'Backblaze B2' is selected) Enter the specific endpoint URL provided by Backblaze B2 for your bucket.
- S3 URL Field: This field shows the endpoint for your S3 storage. For 'Custom URL', you enter it manually. For other providers, it might be pre-filled or automatically generated.
- Bucket Name Field: Enter the exact name of your S3 bucket where you intend to store your files.
- Region Field: Specify the geographical region where your S3 bucket is hosted (e.g.,
us-west-1 for AWS).
- Access Key Field: Input your S3 Access Key, which is a unique identifier for your S3 account or user.
- Secret Key Field: Enter your S3 Secret Key. This highly sensitive key will be encrypted and securely stored using your two-factor authentication.
- Verify and Save Button: Click this button after entering your S3 details. The application will test your connection without considering CORS. If successful, your credentials will be saved, and you'll proceed to CORS configuration.
- Permission setup (CORS) Section: Once your S3 credentials are validated, this section appears. It provides essential instructions and code examples (for AWS S3, Cloudflare R2) on how to configure Cross-Origin Resource Sharing (CORS) on your S3 bucket. CORS is vital for enabling direct file uploads and downloads from your web browser without size limitations.
- How to setup own permissions for S3 based browser file up / download link: A link to an FAQ page for detailed CORS setup instructions.
- Test CORS Button: After configuring CORS on your S3 bucket, click this button to verify if the CORS policy is correctly set up, allowing direct browser interaction with your S3 storage.
Scenario Executions
Possible usage steps within this page
Scenario 1: Enabling and Successfully Configuring AWS S3 Storage
- Activate S3 Storage: Locate the "Setup S3 storage for file upload / download" switch and turn it "ON". This reveals the configuration options.
- Select Provider: From the "Select S3 Provider" dropdown, choose "AWS S3".
- Enter S3 Details: Fill in the following fields with your specific AWS S3 information:
- "Bucket Name": (e.g.,
my-unique-aws-bucket)
- "Region": (e.g.,
eu-central-1)
- "Access Key": Your AWS S3 access key.
- "Secret Key": Your AWS S3 secret key. Remember, this will be encrypted for security.
- Verify and Save Credentials: Click the "Verify and Save" button. The application will test the connection to your AWS S3 bucket using the provided keys.
- CORS Configuration: If your credentials are valid, a "S3 credentials are valid" message appears, and a "Permission setup (CORS)" section becomes visible. Follow the instructions provided, specifically the AWS S3 CORS policy example, and apply it to your AWS S3 bucket's CORS settings in the AWS Management Console.
- Test CORS: Once you've updated your CORS policy on AWS, click the "Test CORS" button on this page.
- Confirmation: If the CORS test is successful, you'll see a "CORS configuration is valid" message, confirming that your S3 storage is now fully configured for unlimited file uploads and downloads.
Scenario 2: Enabling and Successfully Configuring Cloudflare R2 Storage
- Activate S3 Storage: Turn the "Setup S3 storage for file upload / download" switch "ON".
- Select Provider: Choose "Cloudflare R2" from the "Select S3 Provider" dropdown.
- Enter Cloudflare Account ID: In the "Cloudflare Account ID" field, enter your Cloudflare Account ID. Observe that the "Generated S3 URL" field automatically populates.
- Enter R2 Details: Fill in:
- "Bucket Name": (e.g.,
my-r2-storage)
- "Access Key": Your Cloudflare R2 access key.
- "Secret Key": Your Cloudflare R2 secret key.
- Verify and Save Credentials: Click "Verify and Save". Upon successful connection, a "S3 credentials are valid" message will appear.
- CORS Configuration: In the "Permission setup (CORS)" section, refer to the Cloudflare R2 CORS policy example. Implement this policy within your Cloudflare R2 bucket settings.
- Test CORS: Click the "Test CORS" button on this page.
- Confirmation: A "CORS configuration is valid" message confirms successful setup, enabling direct file operations with your R2 storage.
Scenario 3: Disabling S3 Storage
- Deactivate S3 Storage: Locate the "Setup S3 storage for file upload / download" switch and turn it "OFF".
- Save Changes: Click the "Save" button.
- Confirmation: All your S3 configuration details will be cleared from the application, and the use of your own S3 storage will be disabled.
Possible errors which may occur on this page
Error 1: S3 Connection Test Failed (Invalid Credentials)
Cause: This error, indicated by "S3 connection test failed. Please check your credentials.", occurs when the application cannot successfully connect to your S3 storage using the provided S3 URL, Bucket Name, Access Key, or Secret Key. This usually means one or more of these details are incorrect, or your S3 user/role lacks the necessary permissions to access the bucket.
How to Resolve:
- Carefully review each input field for typos.
- Verify your Access Key and Secret Key directly in your S3 provider's management console.
- Ensure the specified "Bucket Name" and "Region" exactly match your S3 setup.
- Check the permissions assigned to your S3 Access Key. It needs at least read and write access to the specified bucket.
Error 2: Missing Required Information
Cause: If you attempt to "Verify and Save" without filling in all mandatory fields (e.g., "Bucket Name", "Access Key", "Secret Key", or provider-specific IDs like "Cloudflare Account ID"), a red error message will appear directly under the empty field, stating what is missing (e.g., "Please enter bucket name").
How to Resolve: Simply fill in all the required fields as indicated by the error messages.
Error 3: Incorrect S3 URL Format
Cause: When using a "Custom URL" provider or "Backblaze B2", the "S3 URL" field must begin with either http:// or https://. If you enter a URL without this prefix, you will see an error message like "URL must start with http:// or https://".
How to Resolve: Correct the URL by adding http:// or https:// at the beginning, ensuring it's a valid web address.
Error 4: CORS Test Failed
Cause: After successfully validating your S3 credentials, if you click "Test CORS" and receive a "CORS test failed. Please check your CORS configuration." message, it means your S3 bucket's Cross-Origin Resource Sharing (CORS) policy is not correctly set up. This policy is crucial for enabling your web browser to directly upload and download files to/from your S3 storage. Without it, file operations might be limited (e.g., max 50 MB via awaBerry Cloud proxy).
How to Resolve:
- Revisit the "Permission setup (CORS)" section on the page.
- Carefully copy the provided JSON CORS policy example that matches your S3 provider (AWS S3, Cloudflare R2, etc.).
- Navigate to your S3 bucket's settings in your S3 provider's management console and paste/configure this CORS policy precisely.
- Save the changes in your S3 provider's console and then return to this page to click "Test CORS" again.