Skip to main content

Chat File Preview


Use the Chat File Preview screen to review an attachment before sending it.

This screen displays file information, supports an optional message, and sends the attachment to the active chat.



This screen includes:

#ElementDescription
1Close actionCloses the attachment preview
2Attachment previewDisplays the selected file
3File informationDisplays the file name, type, and size
4Message inputEnters a message
5Send actionSends the message

Workflow

  1. Open the file uploader.
  2. Select a file.
  3. Review the attachment.
  4. Enter an optional message.
  5. Select Send.

Validations

ScenarioApp BehaviorSDK Output
File selectedDisplay attachment previewfile = selected
File information availableDisplay file detailsfileInfo = displayed
Message updatedUpdate composer statePATCH /api/v3/messages/send-file/update
File validation succeedsEnable send actionstate = ready
File validation failsDisplay validation errorstatus = 405
Upload unavailableDisplay error stateerror = upload_unavailable

Actions

ScenarioApp BehaviorSDK Output
Preview openedDisplay attachment previewPUT /api/v3/messages/file-preview
Uploader openedOpen file pickerPATCH /api/v3/messages/open-uploader
Message enteredUpdate file submission statePATCH /api/v3/messages/send-file/update
Send selectedSend file and optional messagePOST /api/v3/messages/send-file
Close selectedDismiss attachment previewnavigation = dismiss

Endpoint Resources

PUT 

File Preview

v3/messages/file-preview

Displays the file upload dialog for the selected chat.

Open Uploader

PATCH 

v3/messages/open-uploader

Opens the file picker for the selected chat.

Update Send File

PATCH 

v3/messages/send-file/update

Validates the selected file and caption, then updates the Send button state.

Save File

POST 

v3/messages/send-file

Sends a file and optional caption in the selected chat.