NextGen Knowledge Center

Built-In Attachment Functions

  • getAttachmentIds()
    • Get a List containing the IDs of all Attachments associated with this message. Uses the current connectorMessage variable.
  • getAttachmentIds(channelId, messageId)
    • Get a List containing the IDs of all Attachments associated with any channel / message.
      channelIdThe ID of the channel associated with the attachments.
      messageIdThe ID of the message associated with the attachments.
  • getAttachments(base64Decode)
    • Get List of Attachments associated with this message. This will get all attachments that have been added in the source and destination(s).
      base64DecodeIf true, the content of each attachment will first be Base64 decoded for convenience.
  • getAttachment(attachmentId, base64Decode)
    • Get a specific Attachment associated with this message. Uses the current connectorMessage variable.
    • attachmentIdThe ID of the attachment to retrieve.
      base64DecodeIf true, the content of the attachment will first be Base64 decoded for convenience.
  • getAttachment(channelId, messageId, attachmentId, base64Decode)
    • Get a specific Attachment associated with any channel / message. You can use this to retrieve an attachment from a completely different channel.
      channelIdThe ID of the channel to retrieve the attachment from.
      messageIdThe ID of the message to retrieve the attachment from.
      attachmentIdThe ID of the attachment to retrieve.
      base64DecodeIf true, the content of the attachment will first be Base64 decoded for convenience.
  • addAttachment(data, type, base64Encode)
    • Add attachment (String or byte[]) to the current message.
      dataThe data to insert as an attachment. May be a string or byte array.
      typeThe MIME type of the attachment.
      base64EncodeIf true, the content will be Base64 encoded for convenience. If the content you are passing in is not already Base64 encoded, you should pass in true for this argument.
  • updateAttachment(attachment, base64Encode)
  • updateAttachment(attachmentId, data, type, base64Encode)
  • updateAttachment(channelId, messageId, attachment, base64Encode)
  • updateAttachment(channelId, messageId, attachmentId, data, type, base64Encode)
    • Updates an attachment associated with the current connector message, or with any message from any channel.
      attachmentThe The Attachment Object to update.
      attachmentIdThe unique ID of the attachment to update.
      channelIdThe ID of the channel the attachment is associated with.
      messageIdThe ID of the message the attachment is associated with.
      dataThe attachment content (must be a string or byte array).
      typeThe MIME type of the attachment.
      base64EncodeIf true, the content will be Base64 encoded for convenience. If the content you are passing in is not already Base64 encoded, you should pass in true for this argument.