Upload a file to a bucket using a signed URL.
createSignedUploadURL()
.let fileData = "Hello World".data(using: .utf8)!
try await supabase.storage
.from("avatars")
.uploadToSignedURL(
"folder/avatar1.png",
token: "your-signed-token",
data: fileData,
options: FileOptions(
contentType: "text/plain"
)
)
let fileURL = URL(fileURLWithPath: "/path/to/file.txt")
try await supabase.storage
.from("avatars")
.uploadToSignedURL(
"folder/avatar1.png",
token: "your-signed-token",
fileURL: fileURL,
options: FileOptions(
contentType: "text/plain"
)
)