Home

Update a bucket

Updates a Storage bucket

  • RLS policy permissions required:
    • buckets table permissions: select and update
    • objects table permissions: none
  • Refer to the Storage guide on how access control works
Parameters
    id
    REQUIRED
    string

    A unique identifier for the bucket you are updating.

    options
    REQUIRED
    object

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