For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Replace an existing file

Examples

Update file

let fileName = "avatar1.png"

try await supabase.storage
  .from("avatars")
  .update(
    path: "public/\(fileName)",
    file: fileData,
    options: FileOptions(
      cacheControl: "3600",
      contentType: "image/png",
      upsert: true
    )
  )