Skip to main content

from.createSignedUrl()

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

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

Parameters

  • pathrequiredstring

    The file path to be downloaded, including the current file name. For example folder/image.png.

  • expiresInrequirednumber

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

Notes

  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: select

Examples

Create Signed URL

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