Flutter: Download a file | Supabase Docs (original) (raw)

Downloads a file.

Parameters

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

(Optional)
Transform the asset before serving it to the client.

Examples

Download file

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

With transform

final Uint8List file = await supabase
  .storage
  .from('avatars')
  .download(
    'avatar1.png',
    transform: TransformOptions(
      width: 200,
      height: 200,
    ),
  );