Skip to main content

from.getPublicUrl()

Retrieve URLs for assets in public buckets

final res = supabase
.storage
.from('public-bucket')
.getPublicUrl('avatar1.png');
final publicURL = res.data;

Notes#

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

Examples#

Returns the URL for an asset in a public bucket#

final res = supabase
.storage
.from('public-bucket')
.getPublicUrl('avatar1.png');
final publicURL = res.data;