Create a bucket
Creates a new Storage bucket
- RLS policy permissions required:
buckets
table permissions:insert
objects
table permissions: none
- Refer to the Storage guide on how access control works
Parameters
- idREQUIREDstring
A unique identifier for the bucket you are creating.
- optionsOptionalobjectpublicREQUIREDboolean
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. By default, buckets are private.
const { data, error } = await supabase
.storage
.createBucket('avatars', { public: false })