Skip to main content

from.download()

Downloads a file.

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

Parameters

  • pathrequiredstring

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

Notes

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

Examples

Download file

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