emptyBucket()
Removes all objects inside a single bucket.
const { data, error } = await supabase
.storage
.emptyBucket('avatars')
Parameters
idrequired
string
The unique identifier of the bucket you would like to empty.
Notes
- Policy permissions required:
buckets
permissions:select
objects
permissions:select
anddelete
Examples
Empty bucket
const { data, error } = await supabase
.storage
.emptyBucket('avatars')