JavaScript: Create a bucket | Supabase Docs (original) (raw)

Creates a new Storage bucket

Parameters

(Required)
A unique identifier for the bucket you are creating.

(Required)

Examples

Create bucket

const { data, error } = await supabase
  .storage
  .createBucket('avatars', {
    public: false,
    allowedMimeTypes: ['image/png'],
    fileSizeLimit: 1024
  })