async uploadMultipartForm(file, opts) {
      opts = opts || {};
      let postBody = null;
      // verify the required parameter 'file' is set
      if (file === undefined || file === null) {
        throw new Error("Missing the required parameter 'file' when calling uploadMultipartForm");
      }

      let pathParams = {
      };
      let queryParams = {
        'contentType': opts['contentType'],
        'filename': opts['filename'],
        'x-filename': opts['xFilename']
      };
      let headerParams = {
      };
      let formParams = {
        'file': file
      };

      let authNames = ['API_KEY'];
      let contentTypes = ['multipart/form-data'];
      let accepts = ['application/json'];
      let returnType = ['String'];

      return this.callApi(
        '/attachments/multipart', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
/**
     * Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
     * Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
     * @param {File} file file
     * @param {Object} opts Optional parameters
     * @param {String} opts.contentType Optional content type of attachment
     * @param {String} opts.filename Optional name of file
     * @param {String} opts.xFilename Optional content type header of attachment
     * @return {Promise<Array.<String>>}
     */
Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
Upload an attachment for sending using a Multipart Form request . Returns an array whose first element is the ID of the uploaded attachment . Email attachments are essentially files with meta data . Files are byte arrays and the meta data is a content type and a filename . These properties allow email clients to display the filename and icon etc . When sending emails with attachments first upload each attachment with an upload endpoint . Record the returned attachment ID and use it with subsequent email sending . For legacy reasons the ID is returned as the first element in an array . Only a single ID is ever returned . To send the attachments pass a list of attachment IDs with ` SendEmailOptions ` when sending an email . Using the upload endpoints prior to sending mean attachments can easily be reused .
async uploadMultipartForm(file, opts) {
      opts = opts || {};
      let postBody = null;
      if (file === undefined || file === null) {
        throw new Error("Missing the required parameter 'file' when calling uploadMultipartForm");
      }
      let pathParams = {
      };
      let queryParams = {
        'contentType': opts['contentType'],
        'filename': opts['filename'],
        'x-filename': opts['xFilename']
      };
      let headerParams = {
      };
      let formParams = {
        'file': file
      };
      let authNames = ['API_KEY'];
      let contentTypes = ['multipart/form-data'];
      let accepts = ['application/json'];
      let returnType = ['String'];
      return this.callApi(
        '/attachments/multipart', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
async uploadMultipartForm ( file , opts ) { opts = opts || { } ; let postBody = null ; if ( file === undefined || file === null ) { throw new Error ( "Missing the required parameter 'file' when calling uploadMultipartForm" ) ; } let pathParams = { } ; let queryParams = { 'contentType' : opts [ 'contentType' ] , 'filename' : opts [ 'filename' ] , 'x-filename' : opts [ 'xFilename' ] } ; let headerParams = { } ; let formParams = { 'file' : file } ; let authNames = [ 'API_KEY' ] ; let contentTypes = [ 'multipart/form-data' ] ; let accepts = [ 'application/json' ] ; let returnType = [ 'String' ] ; return this . callApi ( '/attachments/multipart' , 'POST' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; }
Upload an attachment for sending using a Multipart Form request.
Upload an attachment for sending using a Multipart Form request .
// verify the required parameter 'file' is set