getFileBytes method

  1. @override
Future<Uint8List?> getFileBytes(
  1. String fileId, {
  2. String? bucketId,
})
override

Implementation

@override
Future<Uint8List?> getFileBytes(String fileId, {String? bucketId}) async {
  try {
    final Uint8List fileBytes = await Supabase.instance.client.storage
        .from(mainBucketId)
        .download(fileId);
    return fileBytes;
  } catch (e) {
    //print('getFileBytes error:$e');
    logger.severe('getFileBytes error:$e');
    return null;
  }
}