Included components for Wasabi:
Wasabi Dropzone: A visual element for handling file uploads.
Available actions for Wasabi:
Get Upload Presigned Expiring URL
Generate Download Presigned Expiring URL
Put File to Wasabi
Get File Base64 DataURI from Wasabi
Put Base64 DataURI to Wasabi
Delete File from Wasabi
Get File Metadata from Wasabi
List Objects from Wasabi
Copy Object between Wasabi buckets
Set File Public Access in Wasabi
Create Bucket in Wasabi
Delete Bucket in Wasabi
ELEMENT DESCRIPTION
The WASABI DROPZONE is a visual component that allows users to drag and drop or select single or multiple files. It supports uploading, viewing, and deleting files.
1) Sign up for WASABI:
https://wasabi.com/sign-up/2) Create a User:
Navigate to:
https://console.wasabisys.com/#/usersCheck the box TYPE OF ACCESS: PROGRAMMATIC (CREATE API KEY).
Under POLICIES, select AMAZONS3FULLACCESS, then click CREATE USER.
Save the ACCESS KEY and SECRET KEY for later use.
3) Configure Plugin Settings:
In the plugin settings, enter the following:
API KEY
SECRET
4) Add the WASABI DROPZONE to Your App:
Drag and drop the WASABI DROPZONE visual element into your application.
5) Configure the WASABI DROPZONE Element:
Select the WASABI DROPZONE element and go to the APPEARANCE section. Configure the following fields:
FIELDS:
OUTPUT TYPE: Must always be set to FILE METADATA (WASABI DROPZONE).
ACCEPTED FILE TYPES: Specify acceptable file types using file extensions (e.g., .jpg, .pdf, .doc) or MIME types (e.g., image/*, video/*). Leave empty to accept any file type.
UPLOAD MULTIPLE FILES: Enable or disable multi-file uploads.
MAX FILE SIZE: Define the maximum file size allowed in MiB.
THUMBNAIL SETTINGS:
THUMBNAIL MAX WIDTH: Maximum width for thumbnail resizing while maintaining aspect ratio.
THUMBNAIL MAX HEIGHT: Maximum height for thumbnail resizing while maintaining aspect ratio.
THUMBNAIL QUALITY: Compression quality for thumbnails (range: 0 –1).
IMAGE RESIZING & COMPRESSION:
MAX WIDTH: Maximum width for image resizing while maintaining aspect ratio.
MAX HEIGHT: Maximum height for image resizing while maintaining aspect ratio.
IMAGE QUALITY: Compression quality for images (range: 0–1).
5) Integrate Logic into Your App:
Use the WASABI DROPZONE events, states, and actions as part of your application workflow.
EVENTS
Accepted File Loop: Triggered for each file that meets the criteria specified in Accepted File Types and Max File Size. Use the Get Upload Presigned Expiring URL action to generate a URL and the Upload current file using presigned url action to upload.
Rejected File Loop: Triggered for each file that fails to meet the criteria.
Uploaded File Loop: Triggered after a file upload is completed successfully.
All Files Uploaded: Triggered when all files in the queue are uploaded.
EXPOSED STATES
Use these states with elements like groups or text fields to process and display relevant data from the WASABI DROPZONE:
Accepted Files: Metadata for files meeting the criteria. Metadata includes:
file_name: File name.
upload_percentage: Upload progress (0–100).
file_size_bytes: File size in bytes.
thumbnail_preview_data: Base64-encoded thumbnail data.
thumbnail_width: Thumbnail width.
thumbnail_height: Thumbnail height.
status: Current file status (added, queued, uploading, error, success).
uuid: Unique identifier for the file.
upload_filepath: File path and name.
upload_bytes_sent: Upload progress in bytes.
Current File: Metadata for the file currently being uploaded.
Latest Uploaded File: Metadata for the most recently uploaded file.
Rejected Files: Metadata for files that failed to meet the criteria, including:
message: Reason for rejection.
Total Upload Progress: Total upload progress as a percentage (0–100).
Dragging Over: Indicates if a file is being dragged over the dropzone.
ELEMENT ACTIONS
Use these actions in your workflows:
Upload current file using presigned url: Upload the current file using a presigned upload URL.
Remove File: Remove a file from the dropzone by its uuid.
Reset Dropzone: Reset the dropzone to its initial state.
Cancel Upload: Cancel the upload of a file by its uuid.
Wasabi Actions
GET UPLOAD PRESIGNED EXPIRING URL
This action generates a URL allowing file uploads to a specified bucket and path. It works with the Wasabi Dropzone element.
Input Fields:
BUCKET NAME: Name of the bucket.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to upload (e.g., path1/path2/filename.ext).
EXPIRATION TIME: Expiration time in seconds.
Output Fields:
URL: Presigned expiring URL for uploading.
GENERATE DOWNLOAD PRESIGNED EXPIRING URL
This action generates a URL for downloading a file from a bucket, expiring after a set time. This is useful for allowing users to download a file without needing Wasabi credentials or permissions.
Input Fields:
BUCKET NAME: Name of the bucket.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to download (e.g., path1/path2/filename.ext).
EXPIRATION TIME: Expiration time in seconds.
Output Fields:
URL: Presigned expiring URL for downloading.
PUT FILE TO WASABI
This action uploads a file to a Wasabi bucket and returns the object key or URL upon success. File size must be under 22 MB.
Input Fields:
File URL: File URL to upload (must be accessible via HTTPS).
CONTENT TYPE: MIME type of the content (e.g., image/png, video/mp4).
BUCKET NAME: Name of the bucket.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to save (e.g., path1/path2/filename.ext).
GENERATE URLS: Option to generate virtual-hosted-style URLs.
Output Fields:
FILE: Object key or URL.
GET FILE BASE64-DATAURI FROM WASABI
This action retrieves a file from Wasabi and encodes it in Base64 Data URI format. File size must be under 4.5 MB.
Input Fields:
BUCKET NAME: Name of the bucket.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to retrieve (e.g., path1/path2/filename.ext).
Output Fields:
BASE64 DATAURI: Base64-encoded file data.
PUT BASE64 DATAURI TO WASABI
This action uploads a Base64-encoded Data URI to a Wasabi bucket. The file size must be under 22 MB.
Input Fields:
BASE64 DATAURI: Base64-encoded Data URI in the format data:[mimeType];base64,[base64Data].
BUCKET NAME: Name of the bucket.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to save (e.g., path1/path2/filename.ext).
GENERATE URLS: Option to generate virtual-hosted-style URLs.
Output Fields:
FILE: Object key or URL.
DELETE FILE FROM WASABI
This action deletes a file from your Wasabi bucket, returning the object key or URL if the operation is successful.
Input Fields:
BUCKET NAME: Bucket name from which the file will be deleted.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to delete.
Output Fields:
FILE: Object key.
GET FILE METADATA FROM WASABI
This action retrieves the metadata of the specified object.
Input Fields:
BUCKET NAME: Bucket name of the file.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name to process. Format: [path/]filename.ext.
Output Fields:
FILE SIZE: Returns the size of the file's content in bytes.
CREATION AT: Date and time the file was created (RFC 3339).
LIST OBJECTS FROM WASABI
This action returns the list of files, folders, or URLs from a Wasabi bucket.
Input Fields:
BUCKET NAME: Bucket name from which the list will be retrieved.
STORAGE REGION: Bucket region.
PREFIX FILTER: Limit the response to keys starting with a specified string.
GENERATE URLS: Generate virtual-hosted-style URLs in the response.
INCLUDE FOLDERS: Include folders in the response.
Output Fields:
LIST: Returns the list of objects’ key or URL.
COPY FILE
This action copies a file from a source bucket and path to a target bucket and path, then returns the object key or URL of the target file.
Input Fields:
STORAGE REGION: Bucket region.
SOURCE BUCKET: Bucket name of the source file.
SOURCE FILE PATH: Source path & file name to be copied. Format: [path/]filename.ext.
TARGET BUCKET: Bucket name to which the file will be copied.
TARGET FILE PATH: Target path & file name. Format: [path/]filename.ext.
GENERATE URLS: Generate virtual-hosted-style URLs in the response.
Output Fields:
FILE: Object key or URL.
SET FILE PUBLIC ACCESS
This action enables or disables public access via the virtual-hosted-style URL.
Input Fields:
BUCKET: Bucket name of the file.
STORAGE REGION: Bucket region.
FILE PATH: Path and file name. Format: [path/]filename.ext.
PUBLIC ACCESS: Enable or disable public access via the URL.
GENERATE URLS: Generate virtual-hosted-style URLs in the response.
Output Fields:
FILE: Object key or URL.
CREATE BUCKET IN WASABI
This action creates a bucket in the specified region.
Input Fields:
BUCKET: Bucket name to create.
STORAGE REGION: Bucket region.
Output Fields:
BUCKET NAME: Returns the bucket name if successful.
DELETE BUCKET FROM WASABI
This action deletes the empty specified bucket.
Input Fields:
BUCKET: Bucket name to delete.
STORAGE REGION: Bucket region.
Output Fields:
BUCKET NAME: Returns the bucket name if successful.