createBucket()
Creates a new Storage bucket
const { data, error } = await supabase
.storage
.createBucket('avatars', { public: false })
Parameters
idrequired
string
A unique identifier for the bucket you are creating.
optionsrequired
object
No description provided.
publicrequired
boolean
No description provided.
Properties
Notes
- Policy permissions required:
buckets
permissions:insert
objects
permissions: none
Examples
Create bucket
const { data, error } = await supabase
.storage
.createBucket('avatars', { public: false })