from.move()

Moves an existing file, optionally renaming it at the same time.

1final String result = await supabase
2  .storage
3  .from('avatars')
4  .move('public/avatar1.png', 'private/avatar2.png');

Notes#

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

Examples#

Move file#

1final String result = await supabase
2  .storage
3  .from('avatars')
4  .move('public/avatar1.png', 'private/avatar2.png');