Move an existing file
Moves an existing file.
- Policy permissions required:
buckets
permissions: noneobjects
permissions:update
andselect
Parameters
fromPath
REQUIRED
stringThe original file path, including the current file name. For example folder/image.png
.
toPath
REQUIRED
stringThe new file path, including the new file name. For example folder/image-new.png
.
const { data, error } = await supabase
.storage
.from('avatars')
.move('public/avatar1.png', 'private/avatar2.png')