Home

Create a signed URL

Creates a signed URL. Use a signed URL to share a file for a fixed amount of time.

  • RLS policy permissions required:
    • buckets table permissions: none
    • objects table permissions: select
  • Refer to the Storage guide on how access control works
Parameters
  • path
    REQUIRED
    string

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

  • expiresIn
    REQUIRED
    number

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

  • options
    Optional
    object

const { data, error } = await supabase
  .storage
  .from('avatars')
  .createSignedUrl('folder/avatar1.png', 60)