Skip to main content

createBucket()

Creates a new Storage bucket

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

Parameters#

  • idrequiredstring

    A unique identifier for the bucket you are creating.

  • optionsrequiredobject

    No description provided.

      Properties
    • publicrequiredboolean

      No description provided.

Notes#

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

Examples#

Create bucket#

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