rawSetSafeDocumentAttachmentWithHttpInfo method

Future<Response> rawSetSafeDocumentAttachmentWithHttpInfo(
  1. String documentId,
  2. MultipartFile body, {
  3. String? enckeys,
})

Creates a document's attachment

Note: This method returns the HTTP Response.

Parameters:

  • String documentId (required):

  • MultipartFile body (required):

  • String enckeys:

Implementation

Future<Response> rawSetSafeDocumentAttachmentWithHttpInfo(String documentId, MultipartFile body, { String? enckeys, }) async {
  // ignore: prefer_const_declarations
  final path = r'/rest/v1/document/attachment';

  // ignore: prefer_final_locals
  Object? postBody = body;

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

  queryParams.addAll(_queryParams('', 'documentId', documentId));
  if (enckeys != null) {
    queryParams.addAll(_queryParams('', 'enckeys', enckeys));
  }

  const authNames = <String>[r'basicSchema'];
  const contentTypes = <String>['application/octet-stream'];


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