MultipartFile constructor

MultipartFile(
  1. dynamic data, {
  2. required String filename,
  3. String contentType = 'application/octet-stream',
})

Implementation

MultipartFile(
  dynamic data, {
  required this.filename,
  this.contentType = 'application/octet-stream',
}) : _bytes = fileToBytes(data) {
  _length = _bytes.length;
  _stream = _bytes.toStream();
}