HttpFile.fromPath constructor

HttpFile.fromPath(
  1. String field,
  2. String filePath, {
  3. String? filename,
  4. MediaType? contentType,
})

Creates a new HttpFile from a path to a file on disk.

Implementation

factory HttpFile.fromPath(String field, String filePath,
    {String? filename, MediaType? contentType}) {
  return HttpFile._(field,
      filePath: filePath, filename: filename, contentType: contentType);
}