Attachment JavaScript Functions
Attachment Handlers are used to extract a portion of a message (or the entire message) and store it separately as an attachment. The portion of the message that was extracted is replaced with an attachment replacement token. When you use a destination connector to send a message downstream, Mirth® Connect will automatically take the message and replace any attachment tokens with the actual attachment data (unless you have Reattach Attachments turned off in the Destination Settings) .
Throughout the message lifecycle you can retrieve, modify, and add new attachments with built-in helper functions.