present method

  1. @override
Future<FileUploadPresentationResponse> present(
  1. XFile file
)

the method to present the file; before uploading the chunks, the file is presented and needs FileUploadPresentationResponse.

FileUploadPresentationResponse.id will be used as a reference for chunk uploads.

Implementation

@override
Future<FileUploadPresentationResponse> present(XFile file) {
  return _client
      .request<dynamic>(
        presentPath,
        cancelToken: cancelToken,
        data: presentBody,
        options: dio.Options(
          method: presentMethod,
          headers: presentHeaders,
        ),
      )
      .then(presentParser);
}