store method

Future<String> store({
  1. String path = '',
  2. required String name,
})

Store the file via your Storage layer.

  • destPath should include trailing slash if desired.

Implementation

Future<String> store({String path = '', required String name}) async {
  try {
    final content = await bytes;
    return await Storage.put(path, name, content.toList());
  } catch (e) {
    throw FileSystemException('Failed to store file as $name: $e');
  }
}