Skip to main content

from.getPublicUrl()

Retrieve URLs for assets in public buckets

const { publicURL, error } = supabase  .storage  .from('public-bucket')  .getPublicUrl('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: none

Examples#

Returns the URL for an asset in a public bucket#

const { publicURL, error } = supabase  .storage  .from('public-bucket')  .getPublicUrl('folder/avatar1.png')