uploadFile method

Uploads data from localFile with optional onProgress and StorageUploadFileOptions to object specified by key, and returns a StorageUploadFileOperation.

AWSFile provides various adapters to read file content from file abstractions, such as XFile, PlatformFile, io.File or html.File.

Implementation

StorageUploadFileOperation uploadFile({
  required AWSFile localFile,
  required String key,
  void Function(StorageTransferProgress)? onProgress,
  StorageUploadFileOptions? options,
}) {
  return identifyCall(
    StorageCategoryMethod.uploadFile,
    () => defaultPlugin.uploadFile(
      key: key,
      localFile: localFile,
      onProgress: onProgress,
      options: options,
    ),
  );
}