Skip to main content

from.remove()

Deletes files within the same bucket

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

Parameters

  • pathsrequiredobject

    An array of files to be deleted, 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(['folder/avatar1.png'])