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.
buckets table permissions: noneobjects table permissions: only insert when you are uploading new files and select, insert and update when you are upserting filesdata: for bytes in memory or fileURL: for a file on disk. The fileURL: overload streams the file and infers the content type from the file extension.multipart/form-data. metadata goes in the x-metadata header.upsert, Storage does not replace an existing file.let fileName = "avatar1.png"
let object = try await supabase.storage
.from("avatars")
.upload(
path: "public/\(fileName)",
data: fileData,
options: UploadOptions(
contentType: "image/png",
cacheControl: .maxAge(.seconds(3600)),
upsert: false
)
)
let fileURL = URL(fileURLWithPath: "/path/to/avatar1.png")
try await supabase.storage
.from("avatars")
.upload(path: "public/avatar1.png", fileURL: fileURL)