Skip to main content

File Message

Users can send file messages through the built-in file plugin in Global IM UIKit. The messages will appear in the message list component of the conversation page. The file plugin sends a message containing the file message content object FileMessage (type identifier: RC:FileMsg) by default.

message-file-unread(width=250) (width=250)

Limitations​

  • Only supports sending local files.
  • The maximum file size is 100 MB.
  • Files in file messages can only be uploaded to RC servers and cannot be uploaded to custom server addresses.
  • File preview is not supported in Global IM UIKit. Please use other applications to open the file from the UI.

Sending File Messages​

Click the + button in the input box on the conversation page, and the extension panel will display the option to send file messages.

extension(width=250)

Customizing the UI of File Messages​

File messages are displayed in the message list using the FileMessageItemProvider template. If you need to adjust the built-in message style, it is recommended to implement your own message display template class and provide this custom template to the SDK. All message templates inherit from BaseMessageItemProvider<CustomMessage>, and custom message display templates also need to inherit from BaseMessageItemProvider<CustomMessage>. For more details, see Modifying Message Display Styles.

Hiding the File Message Entry​

Global IM UIKit enables the file message entry in the extension panel by default. If you need to modify this dynamically, you need to override the beforeCreateInputMoreActionView(@NonNull List<InputMoreAction> chatActions) method of the InputPanelComponent component. The FileInputMoreAction class in the collection corresponds to File Send.