getBucket()
Retrieves the details of an existing Storage bucket.
1const { data, error } = await supabase 2 .storage 3 .getBucket('avatars')
Parameters#
idrequired
string
The unique identifier of the bucket you would like to retrieve.
Notes#
- RLS policy permissions required:
buckets
table permissions:select
objects
table permissions: none
- Refer to the Storage guide on how access control works
Examples#
Get bucket#
1const { data, error } = await supabase 2 .storage 3 .getBucket('avatars')