downloadComposerAttachment

Since Attachments that are returned as part of the draft, this method enables the downloading of the content of that attachment.

πŸ“˜

This function is only available for composer plugins

This function is only available on context of type messageComposer

function downloadComposerAttachment(attachmentId: string, cancelToken?: CancelToken): Promise<Link>;

This method will download the attachment specified for the composer's draft.

Parameters

ParameterTypeDescription
attachmentIdStringThe id of the attachment to be downloaded
cancelTokenCancelToken (optional)Token to cancel the request

Return value

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.