upload method

FileUploadTask upload(
  1. File file, [
  2. Map<String, String>? metadata
])

Asynchronously uploads a file to the currently specified FileStorageReference, with optional metadata.

Implementation

FileUploadTask upload(File file, [Map<String, String>? metadata]) {
  assert(file.existsSync());
  final FileUploadTask task = FileUploadTask._(this, file, metadata);
  task._start();
  return task;
}