Dart Reference v2.0

Create a signed URL

Create signed url to download file without requiring permissions. This URL can be valid for a set number of seconds.

  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: select
  • Refer to the Storage guide on how access control works
Parameters
    path
    REQUIRED
    String

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

    expiresIn
    REQUIRED
    int

    The number of seconds until the signed URL expires. For example, 60 for a URL which is valid for one minute.

    transform
    Optional
    TransformOptions

    Transform the asset before serving it to the client.


final String signedUrl = await supabase
  .storage
  .from('avatars')
  .createSignedUrl('avatar1.png', 60);