Update a bucket
Updates a Storage bucket
- RLS policy permissions required:
buckets
table permissions:update
objects
table permissions: none
- Refer to the Storage guide on how access control works
Parameters
- idREQUIREDstring
A unique identifier for the bucket you are updating.
- optionsREQUIREDobjectpublicREQUIREDboolean
The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.
allowedMimeTypesOptionalstring[]specifies the allowed mime types that this bucket can accept during upload
fileSizeLimitOptionalstring | numberspecifies the file size limit that this bucket can accept during upload
const { data, error } = await supabase
.storage
.updateBucket('avatars', { public: false })