> For the complete documentation index, see [llms.txt](https://dmitrii-vasiliev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dmitrii-vasiliev.gitbook.io/docs/bubble-plugins-docs/wasabi-cloud-storage.md).

# Wasabi Cloud Storage

## 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

&#x20;Visit [wasabi.com](https://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.&#x20;

![Access Keys page](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZH7al2-UvQG1-lOtGU%2Fimage.png?alt=media\&token=f77c0174-4065-4706-853e-0eddbcfc741c)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHMDdAep8AvNu8WAAT%2Fimage.png?alt=media\&token=f7b03591-6563-4845-a68b-36bd10259775)

Insert the access key/secret from the plugins tab.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTYB2jdEq7nUPyYcjF%2Fimage.png?alt=media\&token=1ed775d7-4f83-4681-bf10-49ae3cbe8e9e)

&#x20;Add the element 'Wasabi S3' on your page and configure any other preferences for uploading.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHMqHyQzXy_X2eIhXL%2Fimage.png?alt=media\&token=3bfe2b1b-78d1-4b3e-98c3-584af882a57a)

## Plugin fields, events, actions and states

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

### Wasabi S3

Main element of plugin. Allow uploading and other interactions with Wasabi.

<div align="center"><img src="https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTCBBcLhMrtD20n8kp%2Fimage.png?alt=media&amp;token=7463cae8-ba6a-41a0-a33a-779bde746e0f" alt=""></div>

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTCIXWVts6GUtIB7-j%2Fimage.png?alt=media\&token=8d9c1d5d-79a4-4ad5-95c8-a52961f0c469)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTCM8bJiXZvAs9Q740%2Fimage.png?alt=media\&token=fc7219f9-eb96-455e-bc05-5879eacd56bc)

#### Fields

**`Type`** - Set this to 'File (Wasabi)'.

**`Type`** - Set this to 'Uploaded File (Wasabi)'.

**`Type`** - Set this to 'Retrieved File (Wasabi)'.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHQiRsi0fTko0bDWuS%2Fimage.png?alt=media\&token=39c3348e-a43e-4fa4-8114-68b7b4157f05)

**`Private`** - Using 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.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHRRVYjEknjjMB8hsG%2Fimage.png?alt=media\&token=f8a3c035-bc59-455a-a146-4b68d546618a)

**`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.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHR_exm4yzQOhaWD8C%2Fimage.png?alt=media\&token=f7043a0e-41df-417c-8047-861be9cf3ee2)

**`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.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZHS2fV9LAB0Ju5jjSc%2Fimage.png?alt=media\&token=03965374-f633-46d8-9e52-6895cd1260d4)

**`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.

**`Show Watermark`** - Only visible to you in the editor for design reference.

**`Watermark Image`** - The image you would like to display as your reference.

**`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.

#### States

**`Files`** - list of uploaded files. Contains info about file.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTPLFSADTpNKrbsl8w%2Fimage.png?alt=media\&token=0b087d27-3d09-46f4-97f4-f50165f6f23a)

**`Files Count`** - Return number of uploaded files.

**`File Size Total`** - Return 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 action **`Retrieve Buckets`**

**`Retrieved Files`** - List of retrieved files returned by action **`Retrieve Files`**

**`Is Ready`** - return **`true`** if element is ready

**`Is Dragged Over`** - if an file is being dragged over a valid drop target return **`true`** else return **`false`**

**`Is Mobile`** - return **`true`** if user device is mobile, else return **`false`**

**`Is Reading Files`** - while files is reading return **`true`** else return **`false`**

**`Is Uploading`** - if element now upload files to Wasabi return **`true`** else return **`false`**

**`Error`** - return text of 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`**&#x20;

#### Actions

1\) **`Trigger Input`** - emulate click on input and show file dialog.

![File dialog](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZH6n9yu_OOsSGAxmUC%2F-MZI93Ag4licMRCeRy2L%2Fimage.png?alt=media\&token=521d1ba1-6810-4471-992a-ba928cd83d82)

2\) **`Upload`** - Start uploading files to Wasabi.

![Upload action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTPTl6HsElaTV-s8zK%2Fimage.png?alt=media\&token=0c62d31f-d6ed-4a13-a046-c7440f915783)

&#x20;     **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.

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 file from Wasabi.

![Download action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTPcQkymfnNX1h6DWG%2Fimage.png?alt=media\&token=4eb48544-63d5-4bb8-9886-772d659173ae)

&#x20;     **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.

4\) **`Create Bucket`** - create new bucket.

![Create Bucket action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTPlOYV1-K9sIucHk-%2Fimage.png?alt=media\&token=507d20ae-057a-47ff-98f4-0f3f15c9482a)

&#x20;       **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.

![Delete Bucket action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQ09Q964zzfEkMjla%2Fimage.png?alt=media\&token=2739130e-3a19-43d9-89f9-1f27fac3c1f6)

&#x20;     **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.

{% hint style="warning" %}
You can't delete bucket with file&#x73;**.**
{% endhint %}

6\) **`Retrieve Buckets` -** retrieve 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 selected bucket.

![Retrieve Files action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQI2heIAGGp97E2h5%2Fimage.png?alt=media\&token=c1af5045-0b17-4bc5-97a2-be52e01f6c8e)

&#x20;    **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 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 selected bucket&#x20;

![Delete Files/Folder action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQRekswYHyNx6tffh%2Fimage.png?alt=media\&token=bdd938bc-458c-4fda-ae95-ac106f7dad4d)

&#x20;    **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.

![Remove File From Input action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQYhmOdctQN5yZdwE%2Fimage.png?alt=media\&token=f00a666d-fa46-4883-9932-f92f2a2aa2b8)

&#x20;     **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

&#x20;       **Fields:**

* *`Reset after`* - `yes` or `no`

14\) **`Upload Base64`** - upload base64 encoded file to Wasabi.

![Upload Base64 action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQlNkQOJGqIvaBpvd%2Fimage.png?alt=media\&token=cb23c9fa-ba9a-4a50-9f67-04ddef7ad87f)

&#x20;        **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.
* *`File Name`* - Name for this file.
* *`Data URL`* - Base64 encoded data url.

### Progress Bar

Display graphicaly uploading status.

![Progress Bar fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTQw50xN0q5FBDlfcE%2Fimage.png?alt=media\&token=caba15c9-94f3-423c-90c9-2c367ec6d47d)

#### Fields

**`Percentage`** - current percent of upload. Can be number from 0 to 100

**`Background Color`** - Background color of bar

**`Progress Color`** - Color of progress bar

**`Inner Radius`** - Radius of background bar

**`Outer Radius`** - Radius of progress bar

### Data Size

Convert bytes to a more readable value

![Data Size fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTR3dOWcb4nfHPvcAm%2Fimage.png?alt=media\&token=2542ff1a-8310-4348-a025-f1d3b3def2a7)

#### 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.

![Wasabi - Generate Presigned URL action fields](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTSFrQh7lB734M2K6i%2Fimage.png?alt=media\&token=18434dda-6ef0-44d2-a5ac-fa64ab5564ac)

#### Fields

**`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.

**`Filename with path`** - Full path to file with filename. Example: "path/to/file/filename.png"

**`Timeslot`** - Timeslot to use for expires time.&#x20;

{% hint style="info" %}
**Note:** month = 30 days.
{% endhint %}

**`Expires Time`** - The number of timeslot to expire the pre-signed URL operation in.

### Upload File To Wasabi From Another Cloud

This API Call allow to upload 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` .&#x20;

![Fields for Access Key and Secret Key](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTVdecxZOJy_iwLwSH%2Fimage.png?alt=media\&token=e469d09b-0a54-46b2-bff0-2410ab2f889b)

{% hint style="warning" %}
This API Call is in BETA mode. Max upload file size = 150MB. If you try to upload files larger response will be message with error text.
{% endhint %}

#### Fields

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MZTBnciJpFy9VbNAoYR%2F-MZTUZ-aDArSZDvjv0hu%2Fimage.png?alt=media\&token=53812209-7b05-4245-a51f-823c5cbfa292)

**`Private`** - Using 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 sub folders (eg: uploads/images). As a suggestion you could save the folder as 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 file

#### Response

Return text containts url of file from wasabi cloud or error message.

## Restrict access to the bucket

{% hint style="info" %}

### Restricting access to a specific HTTP referer <a href="#example-bucket-policies-use-case-4" id="example-bucket-policies-use-case-4"></a>

&#x20;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 webpages.
{% endhint %}

1. Go to your Wasabi console

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_O9BoamgtxveaThLf%2Fimage.png?alt=media\&token=bac3b388-5692-418a-9636-5bab0481782d)

&#x20;    2\. Go to bucket settings

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_Sqwe7Q237ICqqGMV%2Fimage.png?alt=media\&token=9761d643-f342-4141-bfdd-49c38aa4f7bb)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_SwVAQb3cO-5SAay3%2Fimage.png?alt=media\&token=504998c7-ad27-4f52-956c-2ae3274e2e0e)

&#x20;     3\. Go to tab "POLICIES"

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_T3zRJxfOsQAvQOmO%2Fimage.png?alt=media\&token=ae0c198f-0c96-4c94-97ad-ac681107e79f)

&#x20;   4\. Add code to this area

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_TD84CqQeUvEgBTua%2Fimage.png?alt=media\&token=b0d86306-12e2-4236-9679-17136015cbb3)

```javascript
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "aws:Referer": "YOUR_WEB_SITE_FULL_URL"
        }
      }
    }
  ]
}
```

And Save<br>

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-Mi_NR-PKq7yBfUjbAp-%2F-Mi_TYHy-XkQJ4rckqex%2Fimage.png?alt=media\&token=bbca71b0-a4ac-4114-b24b-733c28961d3a)

## Quick setup

#### Place element on the page

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuMQ_YDsSSzgVHxrxU%2Fimage.png?alt=media\&token=817c3d1a-5cca-4617-a7ce-c5ecde0f8045)

#### Setup your element

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuMm-7Kj3_X1pmmFRX%2Fimage.png?alt=media\&token=a728695b-00d2-4611-9fef-2f9d0276f439)

{% hint style="success" %}
To correctly configure the fields name&#x64;**`Type`**&#x72;ead the documentation attached to them.
{% endhint %}

!["Type" -s setup.](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuNXCkcKml-RGSo3nx%2Fimage.png?alt=media\&token=88e54b1f-b52d-4d7f-a704-92b0222dc807)

#### Choose restrictions for uploading files

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuNoKrOIdrWvcfHtdt%2Fimage.png?alt=media\&token=24bda0e6-4736-4d6e-8fec-4b924dca1257)

#### Change bucket

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuNzsG0FzTxgLO_Do9%2Fimage.png?alt=media\&token=5ff06e0a-d488-4a53-8b11-e661672a651a)

![ Where to find Bucket information](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuOHpPxmt3et-SBkEG%2Fimage.png?alt=media\&token=2948539f-3b75-4aa1-aff0-9e31de6984dc)

#### Customize the file type perceived by the element

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuPGuZB4xJq7uhWUkR%2Fimage.png?alt=media\&token=41ca1f0a-8028-46f2-ae1f-e8276625fefa)

{% hint style="info" %}
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...](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept)

Example:&#x20;

**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.
2. `video/* -`any **video** file.
3. `image/* -`any **image** file.
   {% endhint %}

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

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuSjp-jlr6Pz-qdRjh%2Fimage.png?alt=media\&token=ecaa8539-02fc-42fa-828d-963c8e0b3aed)

{% hint style="info" %}
If you do not want the files to be automatically loaded, you need to set up an action for this action.
{% endhint %}

#### Check if Auto Submit is disabled (`"no"`)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuTC4AVsf3uyUSeZUs%2Fimage.png?alt=media\&token=fd3a2435-e698-4470-b1ed-707853f3ee49)

#### Add a button or other element to trigger the action

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuTWF3DspwK-cvLrIo%2Fimage.png?alt=media\&token=3be3bd6c-718b-4e99-b67b-e4901861e79d)

#### And setup workflow

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuTydbBHxgd0TNpMl4%2Fimage.png?alt=media\&token=a20ec6ba-6e58-4db1-8cbc-dd364dfb8d76)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MiuJhruyP9_zfa60zPe%2F-MiuU8d16BKg-7AXBs0g%2Fimage.png?alt=media\&token=bbe98b2a-d36f-46c3-9b60-c2e591f86132)

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

{% hint style="info" %}
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.
{% endhint %}

## Advanced features

### How to preview files added to Wasabi S3 element

{% hint style="info" %}
All files added to the plugin element can be displayed in the repeating group
{% endhint %}

Place on the page repeating group. Set the **Type of content** to "`File (Wasabi)`", and set the **Data source** to the "`Files`" state returned by the Wasabi S3 element.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXoHrGgZd2vcsy2crC%2Fimage.png?alt=media\&token=703faa12-b58d-4663-b51d-12fd10d9d26f)

Now in the cells of the repeating group you have access to the data about the files.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXp4FnLQ6vCAfDgr0f%2Fimage.png?alt=media\&token=b7f44176-56ef-474a-8396-a6ea7d6fb9de)

{% hint style="warning" %}
The "`Preview`" state will contain the base64 of the loaded image only if "**Generate Preview**" is enabled in the element settings.

&#x20;"`Preview`" state **contains previews for images only.**
{% endhint %}

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXq4xYLoYlOEEFoRu_%2Fimage.png?alt=media\&token=b1906f26-e851-4587-9f04-093f8cdd1866)

### How to preview uploaded files

Place on the page repeating group. Set the **Type of content** to " `Uploaded File (Wasabi)`", and set the **Data source** to the "`Last Uploaded Files`" state returned by the Wasabi S3 element.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXrI3tkWUvmGJxe0QP%2Fimage.png?alt=media\&token=93e2cbad-8c66-40dd-a295-742b470cd990)

Now in the cells of the repeating group you have access to the data about the files.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXrRtwQFQUFPMul8-K%2Fimage.png?alt=media\&token=7a41bc33-85e5-43e3-9e12-e437b5f2015f)

### How to retrieve files from Wasabi

#### Retrieve files

First of all, you need to get the files from Wasabi. To do this, use the "`Retrieve Files`" action.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXrm3YPfxHRB7SdX6s%2Fimage.png?alt=media\&token=4cbe56df-6852-4f69-8a40-a8f43dcc6e38)

When using this action, information about files from Wasabi is saved to the "`Retrieved Files`" element state.

#### Display retrieved files

Place on the page repeating group. Set the **Type of content** to " `Retrieved File (Wasabi)`", and set the **Data source** to the "`Retrieved Files`" state returned by the Wasabi S3 element.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXt0zNY9tjV8EezXWG%2Fimage.png?alt=media\&token=f3a8fa61-6885-4dcb-86c9-67672c4c6028)

Now in the cells of the repeating group you have access to the data about the files.

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXtGi0L_HsDeXpYSun%2Fimage.png?alt=media\&token=b5256c75-10be-4484-ad20-86e0648da258)

### Work with Lists of any data using ForEach

{% hint style="info" %}
**ForEach** is part of the free **Ultimate Toolkit** plugin. This element allows you to work with each data from the list as with independent data.

[Ultimate Toolkit Plugin](https://bubble.io/plugin/ultimate-toolkit-1562812673262x109396480465567740)
{% endhint %}

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXz4bk__H3qvaHaZzB%2Fimage.png?alt=media\&token=f3c1def1-8f43-450e-8155-1aaf5381da35)

In the "`Type`" field, you need to specify the data type of the list.

In the "`List`" field, you must specify a list of data.

Next, you need to start traversing the list

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXzfIzhoVIKxoD_bgG%2Fimage.png?alt=media\&token=0aeea8e2-a766-4032-81b6-4778f8b66c0e)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjXzqgUJibz2nefPAou%2Fimage.png?alt=media\&token=165313b6-793c-4790-b9c5-cc109dbd67a6)

Now we have an event available in which we will work with data

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjY--LaSYuiI7cK1msm%2Fimage.png?alt=media\&token=cad35587-3c15-479c-a9a0-0416ffb42fc0)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjY-ILE9gzxPPhJoymE%2Fimage.png?alt=media\&token=b333aec0-57b9-402d-8084-1371c0ea4342)

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-MjXmUa6UzvL6oZKzuXy%2F-MjY-NEhRYZFJVexYo_Y%2Fimage.png?alt=media\&token=52e099df-eca4-4ceb-9b29-faf706231a8b)

The ForEach element returns the "`Current Item Iterated`" state in which our data is located as if it were an independent value

## Troubleshooting

If you need to create a folder or file with [diacritic ](https://en.wikipedia.org/wiki/Diacritic)you need to use text formatted as URL Encoded:

![](https://3252157027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW450HQkKqYSR06lFVV%2F-M_uAVmc3lyTMmBm9mAG%2F-M_uBVBOgHLTUhZpud4Z%2Fimage.png?alt=media\&token=cd3ed57b-4e3e-4dcc-afaa-d87bb56e5eb5)

## Demo to preview the settings
