Skip to content

ClonableMultipartFile

A http.MultipartFile that can be cloned, so HTTPRetry.send can re-submit a multipart POST request with the same file.

Inheritance

Constructors

ClonableMultipartFile.fromFileSync

ClonableMultipartFile.fromFileSync(
  1. String filePath
)

Creates a new ClonableMultipartFile from a file specified by the filePath, sent as form field file.

ClonableMultipartFile

ClonableMultipartFile(
  1. String filePath,
  2. String field,
  3. Stream<List<int>> stream,
  4. int length, {
  5. String? filename,
  6. MediaType? contentType,
})

Creates a ClonableMultipartFile. Use ClonableMultipartFile.fromFileSync to create one from a file path.

Properties

filePath

String filePath
final

The path of the local file to send.

Methods

cleanup

void cleanup()

Deletes the local file at filePath.

clone

Make a clone of this ClonableMultipartFile.