Dart Reference v2.0

Download a file

Downloads a file.

  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: select
  • Refer to the Storage guide on how access control works
Parameters
    path
    REQUIRED
    String

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

    transform
    Optional
    TransformOptions

    Transform the asset before serving it to the client.


final Uint8List file = await supabase
  .storage
  .from('avatars')
  .download('avatar1.png');