logo

Wasabi Cloud Storage

Demo to preview the settings:

Introduction

Wasabi Hot Cloud Storage is enterprise class, tier-free, instantly available storage and allows you to store an infinite amount of data affordably. Upload & manage files with your Wasabi account.

Prerequisites

You must have an account with Wasabi to interact with the API. Create your account at: https://wasabi.com/​

How to setup

Visit wasabi.com to sign up for their service, you will get an email with link to your console. In your Wasabi console go to Billing->Payment settings then add your Payment method. While you do receive a month free trial to upload private files, a paid account is required to upload public files.
Next, go to the Access Keys page & create a new access key.
Image without caption
Image without caption
Insert the access key/secret from the plugins tab.
Image without caption
Add the element 'Wasabi S3' on your page and configure any other preferences for uploading.​
Image without caption

Plugin fields, events, actions and states

Plugin contains 3 elements, 1 action and 1 API Call.

Wasabi S3

The main element of the plugin. Allow uploading and other interactions with Wasabi.
Image without caption
Image without caption
Image without caption

Fields

Type - Set this to 'File (Wasabi)'.
Type - Set this to 'Uploaded File (Wasabi)'.
Type - Set this to 'Retrieved File (Wasabi)'.
Image without caption
Private - Using an access token has full control. No one else has access rights, not public. Yes or No
Bucket Name - The name of the Bucket you would like to upload to. Case sensitive.
Image without caption
Bucket Region - The region of where this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
Image without caption
Folder Structure - The folder structure of where this file should be saved (example: uploads) . You can also specify sub folders (eg: uploads/images). As a suggestion you could save the folder as current user/thing's unique id.
Image without caption
File Name Prefix - Prefix for the file name. Some special characters (for example: !$#@), will not upload correctly.
Input Text - Add text to the input, default Bubble typeface styles will apply. If you would like to stye your own input in Bubble, make your element hidden on the page & then use the workflow action to trigger input.
Accept - Specify the file extension(s) (e.g: .gif, .jpg, .png, .doc) the user can pick from or specify a group of file types like: audio/, video/ image/*. Defaults to all if empty. In the case of an extension not validating correctly you can also use the mime type here.
Max File Size - Total value for all files in bytes, 1000000 = 1MB (Megabyte) or 5000000000 is 5GB (Gigabytes). Defaults to any size if empty.
Max File Count - Max number of files the user can upload. Defaults to any amount if empty.
Auto Submit - Upload the files instantly to Wasabi S3 server.
Complete Reset - Reset progress & input when a file or all files have been uploaded successfully.
Compress Images - Select this option to compress the size of image files.
Compression Size - The size for image compression, this value is in KB.
Generate Preview - Output base46 urls for image files when 'Read Files' option is selected.
Multiple Files - Allow for uploading multiple files at once.
Read Files - Read the input's files and return Name, Extension, Last Modified, Parameters & Size that will be output into the state 'Files'. If generate previews is selected this will also return a base64 url for each image file. If complete reset is yes and auto submit is yes files will not be read.
Upload Directory - Allows the user to select 1 folder to upload, all child folders and files will be selected. This option is non-standard, supported by most newer browsers except IE.
Filter File Names - Separate with space & comma between names if not dynamic. Only matched (case sensitive) names will be uploaded, the matching process happens first before calculating size filecount or reading any other file data. Leave empty to ignore this option.
Rename Files - rename uploaded files or no.
File Names - New names for files.

States

Files - list of uploaded files. Contains info about the file.
Image without caption
Files Count - Return a number of uploaded files.
File Size Total - Return the total size of uploaded files.
Upload Progress - Upload progress of files. From 0 to 100.
Last Uploaded Files - List of all uploaded files.
Retrieved Buckets - List of retrieved buckets returned by the action Retrieve Buckets
Retrieved Files - List of retrieved files returned by the action Retrieve Files
Is Ready - return true if element is ready
Is Dragged Over - if a file is being dragged over a valid drop target return true else return false
Is Mobile - return true if the user device is mobile, else return false
Is Reading Files - while files are reading return true else return false
Is Uploading - if element now upload files to Wasabi return true else return false
Error - return the text of the error
Is Compressing Images - if element now compress images return true else return false
Is Retrieving Files - if element now retrieve files return true else return false
Is Deleting Files - if element now delete files return true else return false

Actions

1) Trigger Input - emulate click on input and show file dialog.​
Image without caption
2) Upload - Start uploading files to Wasabi.​
Image without caption
Fields:
  • Redefine Fields - Selecting yes will use the fields on this action to upload as opposed to the element's fields. To use this option make sure bucket name, region have value.
  • Private - Using access token has full control. No one else has access rights, not public.
  • Bucket Name - The name of the Bucket you would like to upload to. Case sensitive.
  • Bucket Region - The region of where this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
  • Folder Structure - The folder structure of where this file should be saved (example: uploads) . You can also specify sub folders (eg: uploads/images). As a suggestion you could save the folder as current user/thing's unique id.
  • File Name Prefix - Prefix for the file name. Some special characters (for example: !$#@), will not upload correctly.
  • Rename Files - rename uploaded files or no.
  • File Names - New names for uploaded files.
Redefine fields - used to reassign the data that was specified in the plugin element. The plugin element has the same fields as the action. Thus, you can use data either from a plugin element or from a given action.
3) Reset File Uploader - Remove all files from this element. Reset states: Files ( to empty list ), Files Count (to 0), File Size Total (to 0), Upload Progress (to 0), Is Uploading (to false), Is Reading Files (to false).
Download File - download a file from Wasabi.
Image without caption
Fields:
  • Bucket Name - The name of the Bucket where the file is stored.
  • Bucket Region - The region of where this file's Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
  • File Location - The location of the file you would like to download For example: user1/uploads/hello.txt
  • Download Name - The name you would like to give to this file. Leave empty to use the original file name.
☝
Note: Plugin functionality doesn’t provide an option to display download progress as it has no access to such data (tracking current load). The download process depends on many factors that the plugin can’t consider (network bandwidth, device capability, file size, etc).
4) Create Bucket - create new bucket.​
Image without caption
Fields:
  • Bucket Name - Must be unique, valid DNS name, 63 characters or less. Case sensitive.
  • Bucket Region - Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
5) Delete Bucket - delete bucket.​
Image without caption
Fields:
  • Bucket Name - The name of the Bucket you would like to delete. Case sensitive.
  • Bucket Region - The region of this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
You can't delete a bucket with files.
6) Retrieve Buckets - retrieve a list with all buckets from your Wasabi.
7) Reset Retrieved Buckets - set value of state Retrieved Buckets to empty list.
8) Retrieve Files - retrieve all files from the selected bucket.​
Image without caption
Fields:
  • Bucket Name - The name of the Bucket you want to look up. Case sensitive.
  • Bucket Region - The region of where the Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
  • Location - Location for the files you want to retrieve, for example: uid/images/. Make sure "/" is a trailing folder name with no extra spaces, case sensitive. Leave empty to list all files from Bucket.
9) Reset Retrieved Files - set value of state Retrieved Files to empty list.
10) Delete Files/Folders - Delete files and folders from the selected bucket
Image without caption
Fields:
  • Bucket Name - The name of the Bucket that holds these files and folders. Case sensitive.
  • Bucket Region - The region of the Bucket that holds these files and folders. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
  • Location/s - Location of files or folders, if not dynamic list then separated by comma and space (file1.png, uid/images/, uid/images/file2.png). For folders make sure "/" is trailing with no extra spaces, case sensitive. Use the Delete Bucket action to delete all files.
11) Remove File From Input - remove file from element.​
Image without caption
Fields:
  • File - The file you would like to remove.
12) Add Files To Input - add new files to element.
13) Cancel Upload - cancel current files uploading
Fields:
  • Reset after - yes or no
14) Upload Base64 - upload base64 encoded file to Wasabi.​
Image without caption
Fields:
  • Redefine Fields - Selecting yes will use the fields on this action to upload as opposed to the element's fields. To use this option make sure bucket name, region have value.
  • Private - Using access token has full control. No one else has access rights, not public.
  • Bucket Name - The name of the Bucket you would like to upload to. Case sensitive.
  • Bucket Region - The region of where this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
  • Folder Structure - The folder structure of where this file should be saved (example: uploads) . You can also specify subfolders (eg: uploads/images). As a suggestion, you could save the folder as the current user/thing's unique id.
  • File Name Prefix - Prefix for the file name. Some special characters (for example: !$#@), will not upload correctly.
  • File Name - Name for this file.
  • Data URL - Base64 encoded data url.

Progress Bar

Display graphicaly uploading status.​
Image without caption

Fields

Percentage - current percent of upload. Can be number from 0 to 100
Background Color - Background color of the bar
Progress Color - Color of the progress barInner Radius - Radius of the background bar
Outer Radius - Radius of the progress bar

Data Size

Convert bytes to a more readable value.​
Image without caption

Fields

Bytes - Bytes to evaluate.
Decimal - Round to decimal place.
Explain - Explains the size abbreviation in brackets.​

Generate Presigned URL

All objects in your bucket, by default, are private. These objects are only accessible by the object owner’s permission. However, there might be instances where the object owner might have to share these objects with others by creating a pre-signed URL, using their own security credentials, for a specific duration of time to download the objects.​
Image without caption

Fields

Bucket Name - The name of the Bucket you would like to upload to. Case sensitive.
Bucket Region - The region where this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
Filename with path - Full path to file with the filename. Example: "path/to/file/filename.png"
Timeslot - Timeslot to use for expires time.
☝
Note: month = 30 days.
Expires Time - The number of timeslots to expire the pre-signed URL operation in.

Upload File To Wasabi From Another Cloud

This API Call allows uploading files to your Wasabi Cloud Storage from another cloud storage ( example: all uploaded in base files is saved to AWS S3 and you have URL of them ).
For API call to work you need to enter Access Key and Secret Key . ​
Image without caption
❗
This API Call is in BETA mode. Max upload file size = 300MB. If you try to upload files with a larger size, it may respond with an error text message.

Fields

Image without caption
Private - Using an access token has full control. No one else has access rights, not public. false or true.
Bucket_Name - The name of the Bucket you would like to upload to. Case sensitive.
Bucket_Region - The region of where this Bucket is stored. Enter one of the following: us-west-1, eu-central-1, us-east-1, us-east-2.
Folder_Structure - The folder structure of where this file should be saved (example: uploads). You can also specify subfolders (eg: uploads/images). As a suggestion, you could save the folder as the current user/thing's unique id.
Filename_Prefix - Prefix for the file name. Some special characters (for example: !$#@), will not upload correctly.
Filename - FIle name to save on Wasabi S3 with extension (.png, .mp3, etc.)
URL_From_Another_Cloud - URL of the file​.

Response

Return text contains URL of the file from wasabi cloud or error message.

Use Cases

1. Restrict access to the bucket (allows access only to application visitors).

❗
Restricting access to a specific HTTP referer Suppose that you have a website with a domain name (www.example.com or example.com) with links to photos and videos stored in your Wasabi bucket, YOUR_WEB_SITE_FULL_URL. By default, all the Wasabi resources are private, so only the account that created the resources can access them. To allow read access to these objects from your website, you can add a bucket policy that allows permission with a condition, that the get request must originate from specific web pages.
  1. Go to your Wasabi console
Image without caption
2. Go to bucket settings
Image without caption
Image without caption
3. Go to tab "POLICIES"
Image without caption
4. Add code to this area
Image without caption
javascript
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "*", "Condition": { "StringLike": { "aws:Referer": "YOUR_WEB_SITE_FULL_URL" } } } ] }
And Save
Image without caption

2. Restrict access to the bucket (deny access to all except the application visitors).

You can make your files private only for those who are trying to access them through a Bubble app. In your WASABI account, open your list of buckets and select the one you want to protect. Click in Settings.
Image without caption
Go to the POLICIES tab
Image without caption
Paste the code below
javascript
{ "Id": "acceptsonlyhttpreferer", "Version": "2012-10-17", "Statement": [ { "Sid": "Public", "Effect": "Deny", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME_HERE/*", "Condition": { "StringNotLike": { "aws:Referer": [ "https://YOUR_BUBBLE_APP_URL_HERE/", "https://YOUR_BUBBLE_APP_URL_HERE/*", "https://console.wasabisys.com/", "https://console.wasabisys.com/*" ] } } } ] }
When all this is set up, your files will be only accessible through
  • Your Bubble app
  • WASABI Console
Even if you copy and paste the file URL in your browser, it will not work. It will only work if the click comes from your app or from Wasabi console.

Quick setup

Place element on the page

Image without caption

Setup your element

Image without caption
βœ…
To correctly configure the fields named Type read the documentation attached to them.
Image without caption

Choose restrictions for uploading files

Image without caption

Change bucket

Image without caption
Image without caption

Customize the file type perceived by the element

Image without caption
βœ…
A filename extension, file extension, or **file type **is an identifier specified as a suffix to the name of a computer file. The extension indicates a characteristic of the file contents or its intended use. More Information... Example: Extensions:
  • .jpg - JPEG has been the most widely used image compression standard in the world.
  • .psd - Photoshop Document (PSD) is a raster format for storing graphic information using lossless compression, created specifically for Adobe Photoshop and supporting all its capabilities.
  • .pdf - Portable Document Format (PDF) is a file format developed by Adobe in 1993 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems.
  • etc.
Groups of file types:
  1. audio/* -any audio file.
  1. video/* -any video file.
  1. image/* -any image file.

You can allow Auto Submit (Auto upload files to Wasabi after selection) and skip the next steps.

Image without caption
​If you do not want the files to be automatically loaded, you need to set up an action for this action.

Check if Auto Submit is disabled ("no")

Image without caption

Add a button or other element to trigger the action

Image without caption

And setup workflow

Image without caption
Image without caption

If Redefine Fields is "no" - workflow setup is finished.

❕
You have the option to change the trash can by reconfiguring the upload endpoint in the action. To do this, specify the value of the field "redefined fields" to yes and specify a new bucket.

Troubleshooting

If you need to create a folder or file with diacritic you need to use text formatted as URL Encoded:
Image without caption

Changelogs

Update 01.07.21

  • Added new event triggered when files are retrieved.

Update 30.04.2021

  • Added ability to upload files using URL of the file via API Call.
  • Added possibility to generate pre-signed links.

Update 31.05.2021 - Version 1.47.0

  • Updated API call "Upload File To Wasabi From Another Cloud", now the max file size is 300mb

Update 01.06.2021 - Version 1.48.0

  • Minor changes

Update 15.06.2021 - Version 1.49.0

  • Fixed issue with uploading files in folders from the backend

Update 21.06.2021 - Version 1.50.0

  • Fixed an error in retrieve file action

Update 26.08.2021 - Version: 1.54.0

  • Fixed empty size of uploaded files

Update 06.09.2021 - Version: 1.57.0

  • Added action "Create folder".
  • Fixed a bug in the "accept" field.
  • Fixed buckets with dots in the name.

Update 13.09.2021 - Version: 1.58.0

  • Fixed: extra "/" character in URL.
  • Added: Ability to rename files.

Update 01.04.2022 - Version: 1.60.0

  • Minor fixes.

Update 22.04.2022 - Version: 1.62.0

  • updated list of file extensions.

Update 04.05.2022 - Version: 1.63.0

  • fixed action "Retrieve files"

Update 17.06.2022 - Version: 1.64.0

  • fixed action "Generate Presigned URL"

Update 30.07.2022 - Version: 1.65.0

  • Expanded data returned by "Upload File To Wasabi From Another Cloud".