from.remove()

Deletes files within the same bucket

const { data, error } = await supabase
.storage
.from('avatars')
.remove(['avatar1.png'])

Parameters

  • pathsrequiredobject

    An array of files to be deletes, including the path and file name. For example [folder/image.png].

Notes

  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: delete and select

Examples

Delete file

const { data, error } = await supabase
.storage
.from('avatars')
.remove(['avatar1.png'])