partFile top-level constant

PartFile const partFile

Use PartFile to define a file field for a Multipart request.

@Post(path: 'file')
@multipart
Future<Response> postFile(@PartFile('file') List<int> bytes);

Supports the following values:

  • List<int>
  • String (path of your file)
  • MultipartFile (from package:http)

Implementation

const partFile = PartFile();