SDKsuni-app
Create an image message from a file
OpenIM uni-app / uni-app x SDK guide for Create an image message from a file.
import { createImageMessageFromFullPath } from '@/uni_modules/unix-openim-sdk'
const message = await createImageMessageFromFullPath('/data/user/0/app/cache/photo.jpg')Commercial createImageMessage() accepts structured source-path metadata. Both require a readable native path. Resolve unifile://, temporary album objects, or content URIs through the host platform and verify existence/permission before sending.
Was this page helpful?