Skip to main content
Version: v1-dev

from.getPublicUrl()

Retrieve URLs for assets in public buckets

  final String publicUrl = supabase
.storage
.from('public-bucket')
.getPublicUrl('avatar1.png');

Notes

  • The bucket needs to be set to public, either via updateBucket() or by going to Storage on app.supabase.com, clicking the overflow menu on a bucket and choosing "Make public"
  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: none

Examples

Returns the URL for an asset in a public bucket

  final String publicUrl = supabase
.storage
.from('public-bucket')
.getPublicUrl('avatar1.png');