downloadDocument(documentID, context)
Downloads the binary content of a document.
Returns
A Promise that obtains the binary content of a document.
Parameters
Name | Type | Description | Required |
documentID | string | The ID of the document whose binary content must be downloaded. | ✅ |
context | string | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API downloads the binary content of the document whose ID is
123445
.
PCore.getAttachmentUtils().downloadDocument('123445', 'app/primary_1')
.then(() => {
// success
}).catch(err => {
// errors
});
Previous topic downloadAttachment(attachmentID, context) Next topic editAttachment(attachmentID, attachmentMetaData, context)