The Chat messages may contain attachments such as images, videos, or data.
The Chat provides built-in support for displaying:
contentTypehas to start with
contenthas to be a valid URL.
- Plain-text attachments—The built-in Chat template displays any content other than images as text.
To define attachments for a message:
- Populate the
attachmentsfield of the message.
- Set the
contentand an optional
contentTypefor each Attachment. Typically, the
contenttype identifier for the attachment is
MIME, but you can also use a string.
By default, message attachments are displayed as a carousel or card deck below the message. You can also display attachments in a list by setting the
attachmentLayout of the message.
To customize the attachments, define an
AttachmentTemplate . To get the default appearance of the built-in attachment template, wrap the template content in a