ApiBody.binaryFile constructor

const ApiBody.binaryFile(
  1. String path, {
  2. String? mimeType,
})

Binary file upload from a file-system path (mobile/desktop only).

On Flutter web there are no file paths — use ApiBody.binaryBytes there.

Implementation

const ApiBody.binaryFile(String path, {String? mimeType})
    : this(
  type: ApiBodyType.binary,
  binaryFilePath: path,
  binaryMimeType: mimeType ?? 'application/octet-stream',
);