AWSFilePlatform.fromPath constructor

AWSFilePlatform.fromPath(
  1. String path, {
  2. String? name,
  3. String? contentType,
})

Creates an AWSFile from a path, optionally specifying a file name.

On VM platforms, the path is the absolute path to a file in the file system.

On Web, the path can be an object url created by URL.createObjectURL() . When passing an object url, it's recommended to set a value for name.

Throws InvalidFileException if cannot get a file content stream from the path.

Implementation

AWSFilePlatform.fromPath(
  String path, {
  super.name,
  super.contentType,
})  : _stream = null,
      _inputFile = null,
      _inputBlob = null,
      _size = null,
      super.protected(
        path: path,
      );