Skip to main content

from.createSignedUrls()

Create signed URLs to download files without requiring permissions. These URLs can be valid for a set number of seconds.

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

Parameters

  • pathsrequiredobject

    The file paths to be downloaded, including the current file names. For example ['folder/image.png', 'folder2/image2.png'].

  • expiresInrequirednumber

    The number of seconds until the signed URLs expire. For example, 60 for URLs which are valid for one minute.

Notes

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

Examples

Create Signed URLs

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