from.createSignedUrls()
Creates multiple signed URLs. Use a signed URL to share a file for a fixed amount of time.
1const { data, error } = await supabase
2 .storage
3 .from('avatars')
4 .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)
Parameters#
pathsrequired
object
The file paths to be downloaded, including the current file names. For example
['folder/image.png', 'folder2/image2.png']
.expiresInrequired
number
The number of seconds until the signed URLs expire. For example,
60
for URLs which are valid for one minute.optionsoptional
object
No description provided.
downloadrequired
|string
boolean
triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
stringrequired
object
No description provided.
booleanrequired
object
No description provided.
Properties
Properties
Notes#
- RLS policy permissions required:
buckets
table permissions: noneobjects
table permissions:select
- Refer to the Storage guide on how access control works
Examples#
Create Signed URLs#
1const { data, error } = await supabase
2 .storage
3 .from('avatars')
4 .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60)