restoreMultipart(model) {
    const fd = new FormData();
    if (!model || !model.length) {
      return fd;
    }
    fd._arcMeta = {
      textParts: []
    };
    model.forEach((part) => {
      const name = part.name;
      let value;
      if (part.isFile) {
        try {
          value = this._dataURLtoBlob(part.value);
        } catch (e) {
          value = '';
        }
      } else {
        value = part.value;
        if (part.isTextBlob) {
          fd._arcMeta.textParts.push(name);
          try {
            value = this._dataURLtoBlob(part.value);
          } catch (e) {
            value = '';
          }
        }
      }
      fd.append(name, value);
    });
    return fd;
  }
/**
   * Restores FormData from ARC data model.
   *
   * @param {Array<Object>} model ARC model for multipart.
   * @return {FormData} Restored form data
   */
Restores FormData from ARC data model.
@param {Array} model ARC model for multipart.
@return {FormData} Restored form data
Restores FormData from ARC data model . @param { Array } model ARC model for multipart . @return { FormData } Restored form data
restoreMultipart(model) {
    const fd = new FormData();
    if (!model || !model.length) {
      return fd;
    }
    fd._arcMeta = {
      textParts: []
    };
    model.forEach((part) => {
      const name = part.name;
      let value;
      if (part.isFile) {
        try {
          value = this._dataURLtoBlob(part.value);
        } catch (e) {
          value = '';
        }
      } else {
        value = part.value;
        if (part.isTextBlob) {
          fd._arcMeta.textParts.push(name);
          try {
            value = this._dataURLtoBlob(part.value);
          } catch (e) {
            value = '';
          }
        }
      }
      fd.append(name, value);
    });
    return fd;
  }
restoreMultipart ( model ) { const fd = new FormData ( ) ; if ( ! model || ! model . length ) { return fd ; } fd . _arcMeta = { textParts : [ ] } ; model . forEach ( ( part ) => { const name = part . name ; let value ; if ( part . isFile ) { try { value = this . _dataURLtoBlob ( part . value ) ; } catch ( e ) { value = '' ; } } else { value = part . value ; if ( part . isTextBlob ) { fd . _arcMeta . textParts . push ( name ) ; try { value = this . _dataURLtoBlob ( part . value ) ; } catch ( e ) { value = '' ; } } } fd . append ( name , value ) ; } ) ; return fd ; }
Restores FormData from ARC data model.
Restores FormData from ARC data model .