createBucket()

Creates a new Storage bucket

const { data, error } = await supabase
.storage
.createBucket('avatars')

Parameters

  • idrequiredstring

    A unique identifier for the bucket you are creating.

Notes

  • Policy permissions required:
    • buckets permissions: insert
    • objects permissions: none

Examples

Create bucket

const { data, error } = await supabase
.storage
.createBucket('avatars')