JavaScript: Copy an existing file

Examples

Copy file

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