Actions27
- Database Actions
- Storage Actions
Storage → Create Bucket
AI-generatedSummary
Create a new Supabase storage bucket with optional public access, file size limit, and allowed MIME types.
Inputs
- bucketName (required) — Name of the bucket (string). Must be provided.
- isPublic — Whether the bucket is publicly accessible (boolean, default: false).
- fileSizeLimit — Maximum file size in bytes allowed for uploads (number, optional).
- allowedMimeTypes — Comma-separated list of MIME types permitted for uploads (string, optional), e.g., 'image/png,application/pdf'.
Output shape
object
Returns an object containing: operation ('createBucket'), bucketName (provided name), options (configuration used), result (bucket details from Supabase API), and success (true). On error, throws an error formatted by Supabase.
Examples
Example 1: Create a private bucket with no restrictions
bucketName: 'my-private-bucket', isPublic: false
Example 2: Create a public bucket for images only with 10MB limit
bucketName: 'public-images', isPublic: true, fileSizeLimit: 10485760, allowedMimeTypes: 'image/jpeg,image/png'