Swift: Create a signed URL
- RLS policy permissions required:
buckets
table permissions: none
objects
table permissions: select
- Refer to the Storage guide on how access control works
Examples
Create Signed URL
let signedURL = try await supabase.storage
.from("avatars")
.createSignedURL(path: "folder/avatar1.png", expiresIn: 60)
Create a signed URL for an asset with transformations
let signedURL = try await supabase.storage
.from("avatars")
.createSignedURL(
path: "folder/avatar1.png",
expiresIn: 60,
transform: TransformOptions(
width: 100,
height: 100
)
)
Create a signed URL which triggers the download of the asset
let signedURL = try await supabase.storage
.from("avatars")
.createSignedURL(
path: "folder/avatar1.png", expiresIn: 60,
download: true
)