FileAttachmentSettingsModel
16 Dec 20251 minute to read
Interface for a class FileAttachmentSettings
Properties
attachmentClick EmitType<ChatAttachmentClickEventArgs>
Event raised when a attachment item is clicked in the Chat UI component wither before sending or after the attachment is sent.
allowedFileTypes string
Specifies the allowed file types for attachments.
Accepts a comma-separated string (e.g., “.jpg,.png”).
attachmentTemplate string|object|HTMLElement
Specifies a custom template for rendering attachments in footer.
Accepts a string or function to define the HTML structure or rendering logic for attachments (e.g., thumbnails, icons, file metadata).
If not provided, the default attachments will be rendered.
enableDragAndDrop boolean
Specifies whether drag and drop is enabled for attachments.
Allows users to drag files into the upload area.
maxFileSize number
Specifies the maximum file size (in bytes) for attachments.
Prevents uploading files larger than this size.
maximumCount number
Specifies the maximum number of attachments allowed per message.
Limits the number of files that can be uploaded and attached to a single message.
Must be a positive integer.
path string
Specifies the path for storing and displaying images.
If both saveFormat and path are configured, the path property takes priority.
previewTemplate string|object|HTMLElement
Specifies a custom template for rendering attachment previews.
Accepts a string or function to define the HTML structure or rendering logic for attachment previews (e.g., thumbnails, icons, file metadata).
If not provided, the default preview will be rendered.
removeUrl string
Specifies the URL to remove the files from the server.
saveFormat SaveFormat
Specifies the format in which the attachment will be saved.
Accepts values such as ‘Blob’ or other supported formats.
saveUrl string
Specifies the URL to save the uploaded files.