uploadDataWithHttpInfo method

Future<Response> uploadDataWithHttpInfo(
  1. String uploadId
)

Perform a file upload

Starts or resumes a file upload. To resume an existing (incomplete) upload, data should be sent starting from the offset specified in the upload session object. The request body can be in one of two formats: - Binary file content streamed in request's body - multipart/form-data ##### Permissions Must be logged in as the user who created the upload session.

Note: This method returns the HTTP Response.

Parameters:

  • String uploadId (required): The ID of the upload session the data belongs to.

Implementation

Future<Response> uploadDataWithHttpInfo(
  String uploadId,
) async {
  // ignore: prefer_const_declarations
  final path = r'/uploads/{upload_id}'.replaceAll('{upload_id}', uploadId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/x-www-form-urlencoded'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}