UploadFile.fromPath constructor

const UploadFile.fromPath({
  1. required String field,
  2. required String path,
  3. String? filename,
  4. String? contentType,
})

A file on disk. Not available on web — use UploadFile.fromBytes there.

Implementation

const UploadFile.fromPath({
  required String field,
  required String path,
  String? filename,
  String? contentType,
}) : this._(
       field: field,
       path: path,
       filename: filename,
       contentType: contentType,
     );