Skip to main content
Version: v2 RC

updateBucket()

Updates a Storage bucket

const { data, error } = await supabase
.storage
.updateBucket('avatars', { public: false })

Parameters

  • idrequiredstring

    A unique identifier for the bucket you are updating.

  • optionsrequiredobject

    No description provided.

      Properties
    • publicrequiredboolean

      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.

Notes

  • RLS policy permissions required:
    • buckets table permissions: update
    • objects table permissions: none
  • Refer to the Storage guide on how access control works

Examples

Update bucket

const { data, error } = await supabase
.storage
.updateBucket('avatars', { public: false })