SDKsuni-app
Create a file message from a file
OpenIM uni-app / uni-app x SDK guide for Create a file message from a file.
import { createFileMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'
const message = await createFileMessageFromFullPath({
filePath: '/data/user/0/app/cache/report.pdf', fileName: 'report.pdf',
})Commercial createFileMessage() can include source-path metadata. Validate path, permission, size, and extension. Treat fileName as display text, never as a path component.
Was this page helpful?