API
FileAttachedParams

FileAttachedParams

See introduction on the Message Attachments page.

id
required
Unique identifier for the attachment.
Type: string | number


file
required
The file object being attached.
Type: File


actions
required
Actions to control the file upload.
Type: { setProgress: (n: number) => void, setError: (e: string) => void, onFinish: () => void }

setProgress
required
A function to update the upload progress (0–100).
Type: (n: number) => void

setError
required
A function for displaying error text in the file interface.
Type: (e: string) => void

onFinish
required
A function to signal the end of file uploading, called after onFileAttached is finished.
Type: () => void