JavaScript: Upload to a signed URL (original) (raw)

Upload a file with a token generated from createSignedUploadUrl.

Parameters

(Required)
The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.

(Required)
The token generated from `createSignedUploadUrl`

(Required)
The body of the file to be stored in the bucket.

(Optional)

Examples

Upload to a signed URL

const { data, error } = await supabase
  .storage
  .from('avatars')
  .uploadToSignedUrl('folder/cat.jpg', 'token-from-createSignedUploadUrl', file)