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: noneobjects
permissions:select
- Refer to the Storage guide on how access control works
Parameters
The file path, including the file name. For example folder/image.png.
The number of seconds until the signed URL expires. For example, 60 for a URL which is valid for one minute.
Transform the asset before serving it to the client.
The width of the image in pixels.
The height of the image in pixels.
Specifies how image cropping should be handled when performing image transformations. Defaults to `ResizeMode.cover`.
Set the quality of the returned image. A number from 20 to 100, with 100 being the highest quality. Defaults to 80
Specify the format of the image requested. When using 'origin' we force the format to be the same as the original image. When this option is not passed in, images are optimized to modern image formats like Webp.
final String signedUrl = await supabase
.storage
.from('avatars')
.createSignedUrl('avatar1.png', 60);