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
A unique identifier for the bucket you are creating.
A parameter to optionally make the bucket public.
The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private.
Specifies the max file size in bytes that can be uploaded to this bucket. The global file size limit takes precedence over this value. The default value is null, which doesn't set a per bucket file size limit.
Specifies the allowed mime types that this bucket can accept during upload. The default value is null, which allows files with all mime types to be uploaded. Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
final String bucketId = await supabase
.storage
.createBucket('avatars');