lib/model/instance/form-partial.js
// additional xlsBlobId column pointing at the xls file blob id.
additional xlsBlobId column pointing at the xls file blob id.
additional xlsBlobId column pointing at the xls file blob id .
static fromXls(stream, contentType, formIdFallback, ignoreWarnings) {
    return splitStream(stream,
      ((s) => xlsform(s, formIdFallback)),
      ((s) => Blob.fromStream(s, contentType)))
      .then(([ { xml, itemsets, warnings }, blob ]) =>
        (((warnings.length > 0) && !ignoreWarnings)
          ? reject(Problem.user.xlsformWarnings({ warnings }))
          : Promise.all([ FormPartial.fromXml(xml), blob.ensure() ])
            .then(([ partial, savedBlob ]) => partial.with({ xlsBlobId: savedBlob.id, itemsets }))));
  }
static fromXls ( stream , contentType , formIdFallback , ignoreWarnings ) { return splitStream ( stream , ( ( s ) => xlsform ( s , formIdFallback ) ) , ( ( s ) => Blob . fromStream ( s , contentType ) ) ) . then ( ( [ { xml , itemsets , warnings } , blob ] ) => ( ( ( warnings . length > 0 ) && ! ignoreWarnings ) ? reject ( Problem . user . xlsformWarnings ( { warnings } ) ) : Promise . all ( [ FormPartial . fromXml ( xml ) , blob . ensure ( ) ] ) . then ( ( [ partial , savedBlob ] ) => partial . with ( { xlsBlobId : savedBlob . id , itemsets } ) ) ) ) ; }
additional xlsBlobId column pointing at the xls file blob id.
additional xlsBlobId column pointing at the xls file blob id .