Skip to main content
Version: v2 RC

from.download()

Downloads a file.

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

Parameters

  • pathrequiredstring

    The full path and file name of the file to be downloaded. For example folder/image.png.

Notes

  • RLS policy permissions required:
    • buckets table permissions: none
    • objects table permissions: select
  • Refer to the Storage guide on how access control works

Examples

Download file

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