Document Upload: Create
Parameters
filefileThe binary data of the file to upload. Only
png, jpg, jpeg, or pdf files are supported. The file must not exceed 4MB.kindmultipleThe type of uploaded document. Value should always be EVIDENCE_DOCUMENT.
Examples
- 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);
}
});