Azure Blob Storage file uploader

Overview

Azure Blob Storage file uploader is a button to upload files to Azure Blob Storage. The uploader allows you to set ACL and specify file type restrictions and MIME types. File uploader sends user data directly to Azure using Shared Access Signature (SAS) unlike data sources that send data through UI Bakery servers.

Properties

Name
Type
Description

lastUploadedFileName

string

Name of the last uploaded file

lastUploadedFileUrl

string

Azure url of last uploaded file

name

string

Component name

Triggers

Name
Description

On Upload Success

Triggered when file upload is successful

Working with the component

Prerequisites

If you are planning to use the Azure Blob Storage file uploader in UI Bakery, you first need to connect your Azure Blob Storage data source and set up CORS policies for your storage account.

To set up CORS policies, navigate to your Storage account settings > Resource sharing (CORS) and select the Blob Service tab. For the cloud version of UI Bakery, add the following configuration:

[
  {
    "AllowedOrigins": ["https://*.uibakery.io"],
    "AllowedMethods": ["DELETE", "GET", "HEAD", "MERGE", "OPTIONS", "PUT", "POST", "PATCH"],
    "AllowedHeaders": ["*"],
    "ExposedHeaders": ["*"],
    "MaxAge": ["0"]
  }
]

To upload files to Azure Blob Storage:

  1. Add the Azure Blob Storage file uploader component to the working area.

  2. Select the necessary Azure Blob Storage data source from the dropdown.

  3. Specify the container and set up other required settings.

  1. Next, click on the component and select the necessary file to upload it.

Once it's uploaded, you will notice that the lastUploadedFileUrl is an Azure Blob Storage URL, and you can refer to it with the {{ui.fileUploader.lastUploadedFileUrl}} variable.

Also, if you need to call any action upon the file upload, you can use the On Upload Success trigger of the component.

Last updated

Was this helpful?