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 = decoder.fileToBytes(data) {
  _length = _bytes.length;
  _stream = BodyBytesStream.fromBytes(_bytes);
}