How can I send the multipart file type request in flutter with specific requirements?

Viewed 74

Request which I need to send with post method

multipartFile = http.MultipartFile.fromBytes(
  'supportDocuments', item.files.single.bytes!,
      contentType: MediaType('application', 'pdf'));
      request.files.add(multipartFile);

request.headers.addAll(headers);
request.fields["processRequestDto"] = jsonEncode(docRefDto);

How can I solve this issue?

0 Answers
Related