Swift: Create a signed URL

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
  )