Document Upload

Document Upload: Create

Parameters
filefile
The binary data of the file to upload. Only png, jpg, jpeg, or pdf files are supported.
kindmultiple

The type of uploaded document. Value should always be EVIDENCE_DOCUMENT.

Examplesanchor

  1. Node
let fs = require('fs');

gateway.documentUpload.create({
  kind: DocumentUpload.Kind.EvidenceDocument,
  file: fs.createReadStream('local_file.pdf')
}).then((result) => {
  if (response.success) {
    // document successfully uploaded
    let document = response.documentUpload;
  } else {
    console.log(response.errors);
  }
});