MultipartFileRecreatable.fromBytes constructor

MultipartFileRecreatable.fromBytes(
  1. List<int> bytes, {
  2. String? filename,
  3. MediaType? contentType,
  4. Map<String, List<String>>? headers,
})

Creates a MultipartFileRecreatable object with bytes.

Implementation

factory MultipartFileRecreatable.fromBytes(
  List<int> bytes, {
  String? filename,
  MediaType? contentType,
  Map<String, List<String>>? headers,
}) {
  return MultipartFileRecreatable(
    Stream.fromIterable(<List<int>>[bytes]),
    bytes.length,
    filename: filename,
    contentType: contentType,
    headers: headers,
  );
}