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