from.remove()
Deletes files within the same bucket
const { data, error } = await supabase
.storage
.from('avatars')
.remove(['folder/avatar1.png'])
Parameters
pathsrequired
object
An array of files to be deleted, including the path and file name. For example [
folder/image.png
].
Notes
- Policy permissions required:
buckets
permissions: noneobjects
permissions:delete
andselect
Examples
Delete file
const { data, error } = await supabase
.storage
.from('avatars')
.remove(['folder/avatar1.png'])