JavaScript: Move an existing file

Moves an existing file to a new path in the same bucket.

Parameters

Examples

Move file

const \{ data, error \} = await supabase
  .storage
  .from('avatars')
  .move('public/avatar1.png', 'private/avatar2.png')