Dart Reference v2.0

Create a bucket

Creates a new Storage bucket

  • Policy permissions required:
    • buckets permissions: insert
    • objects permissions: none
  • Refer to the Storage guide on how access control works
Parameters
    id
    REQUIRED
    String

    A unique identifier for the bucket you are creating.

    bucketOptions
    Optional
    BucketOptions

    A parameter to optionally make the bucket public.


final String bucketId = await supabase
  .storage
  .createBucket('avatars');