Since Attachments that are returned as part of the Message or Comment contain only metadata about the attachment, this method enables the downloading of the content of that attachment.
This function is only available on context of type
function downloadAttachment(messageOrCommentId: string, attachmentId: string, cancelToken?: CancelToken): Promise<File | undefined>;
|String||Message or Comment id for the attachment.|
|String||Attachment id to be downloaded.|
|CancelToken (optional)||Token to cancel the request.|
The function returns a Promise that resolves with either a File containing the attachment data or undefined if it failed to fetch the attachment data.