Uploads a file to an existing bucket.
buckets
table permissions: noneobjects
table permissions: only insert
when you are uploading new files and select
, insert
and update
when you are upserting filesfile_options
are specified, the MIME type defaults to text/html
.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.
The body of the file to be stored in the bucket.
undefined
with open('./public/avatar1.png', 'rb') as f:
response = supabase.storage.from_("avatars").upload(
file=f,
path="public/avatar1.png",
file_options=\{"cache-control": "3600", "upsert": "false"\},
)