📦 Storage

Easily manage the Supabase object store.


You can use the Supabase Storage component to interact with the storage functions offered by Supabase.

Setup

Add the element Supabase Storage to your page.


States

The element exposes the following states:

  • Status Code
  • Status Message
  • Buckets: names of the buckets within your Supabase project
  • Files: names of the files within a bucket
  • Signed URL: file URL

Events

The element triggers the following event:

  • Call Success: triggered when a call to the storage service successfully completes
  • Call Error: triggered when a call to the storage service encounters an error

Create a bucket

Creates a new storage bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

  • Name
    Is Bucket Public?
    Type
    boolean
    Description

    The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.

  • Name
    Allowed Mime Types
    Type
    string
    Description

    Specifies the allowed mime types that this bucket can accept during upload (Comma separated values - e.g "image/png, image/jpeg"). Each mime type specified can be a wildcard, e.g. "image/*", or a specific mime type, e.g. "image/png".

  • Name
    File Size Limit
    Type
    number
    Description

    Specifies the max file size in bytes that can be uploaded to this bucket.


List buckets

Retrieve the names of all the storage buckets within your Supabase project.


Update bucket

Updates a storage bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

  • Name
    Is Bucket Public?
    Type
    boolean
    Description

    The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.

  • Name
    Allowed Mime Types
    Type
    string
    Description

    Specifies the allowed mime types that this bucket can accept during upload (Comma separated values - e.g "image/png, image/jpeg"). Each mime type specified can be a wildcard, e.g. "image/*", or a specific mime type, e.g. "image/png".

  • Name
    File Size Limit
    Type
    number
    Description

    Specifies the max file size in bytes that can be uploaded to this bucket.


Delete bucket

Deletes an existing bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

A bucket can't be deleted with existing objects inside it.


Empty bucket

Removes all objects inside a single bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name


List files

Lists all the files within a bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

  • Name
    Path
    Type
    string
    Description

    The base path inside the bucket

  • Name
    Search
    Type
    string
    Description

    The search string to filter files by

  • Name
    Limit
    Type
    number
    Description

    The maximum number of files you want to be returned

  • Name
    Offset
    Type
    number
    Description

    The starting position

  • Name
    Sort By Column
    Type
    string
    Description

    The column to sort by. Can be any column inside a FileObject.

  • Name
    Sort By Order
    Type
    Dropdown
    Description

    Order (ASC or DESC)


Create signed URL

Creates a signed URL. Use it to share a file for a fixed amount of time. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

  • Name
    Path
    Type
    string
    Description

    The file path, including the current file name. For example "folder/image.png"

  • Name
    Expires In
    Type
    number
    Description

    The number of seconds until the signed URL expires. For example, "120" for a URL which is valid for two minutes

  • Name
    Download
    Type
    boolean
    Description

    Triggers the file as a download if set to true

  • Name
    Download Name
    Type
    string
    Description

    Set this parameter as the name of the file if you want to trigger the download with a different filename

  • Name
    Transform Format
    Type
    dropdown
    Description

    Specify the format of the image requested. When using 'origin', force the format to be the same as the original image

  • Name
    Transform Width
    Type
    number
    Description

    The width of the image in pixels

  • Name
    Transform Height
    Type
    number
    Description

    The height of the image in pixels

  • Name
    Transform Quality
    Type
    number
    Description

    Set the quality of the returned image. A number from 20 to 100, with 100 being the highest quality

  • Name
    Transform Resize
    Type
    dropdown
    Description

    Resize options are cover, contain, or fill, defaulting to cover. Cover maintains aspect ratio while filling width and height. Contain fits the entire image within the dimensions, keeping aspect ratio. Fill stretches the image to fill width and height, altering aspect ratio if needed


Delete files

Delete files in a bucket. You can configure the following fields:

  • Name
    Bucket Name
    Type
    string
    Description

    Bucket name

  • Name
    Path
    Type
    string
    Description

    A string of file paths to delete, each separated by a new line.


Do you need any help? Feel free to reach out