Companion
Functions
Link copied to clipboard
Link copied to clipboard
Content copied to clipboard
上传文件并发送件消息. 如果要上传的文件格式是图片或者语音, 也会将它们作为文件上传而不会调整消息类型.
Link copied to clipboard
suspend fun <C : Contact> ExternalResource.sendAsImageTo(contact: C): MessageReceipt<C>
Content copied to clipboard
将图片作为单独的消息发送给指定联系人.
suspend fun <C : Contact> <ERROR CLASS>.sendAsImageTo(contact: C, formatName: String? = null): MessageReceipt<C>
Content copied to clipboard
将文件作为图片发送到指定联系人.
suspend fun <C : Contact> <ERROR CLASS>.sendAsImageTo(contact: C, formatName: String? = null): MessageReceipt<C>
Content copied to clipboard
读取 InputStream 到临时文件并将其作为图片发送到指定联系人.
Link copied to clipboard
Content copied to clipboard
上传文件并发送文件消息.
Link copied to clipboard
fun <ERROR CLASS>.toExternalResource(formatName: String? = null): ExternalResource
Content copied to clipboard
打开文件并创建 ExternalResource. 注意, 返回的 ExternalResource 需要在使用完毕后调用 ExternalResource.close 关闭.
fun <ERROR CLASS>.toExternalResource(formatName: String? = null): ExternalResource
Content copied to clipboard
立即使用 FileCacheStrategy 缓存 InputStream 并创建 ExternalResource. 返回的 ExternalResource 需要在使用完毕后调用 ExternalResource.close 关闭.
fun ByteArray.toExternalResource(formatName: String? = null): ExternalResource
Content copied to clipboard
创建 ExternalResource. 注意, 返回的 ExternalResource 需要在使用完毕后调用 ExternalResource.close 关闭.
fun <ERROR CLASS>.toExternalResource(formatName: String? = null, closeOriginalFileOnClose: Boolean = true): ExternalResource
Content copied to clipboard
创建 ExternalResource. 注意, 返回的 ExternalResource 需要在使用完毕后调用 ExternalResource.close 关闭, 届时将会关闭 RandomAccessFile.
Link copied to clipboard
Content copied to clipboard
上传文件并获取文件消息.
Link copied to clipboard
上传图片并构造 Image. 这个函数可能需消耗一段时间.
suspend fun <ERROR CLASS>.uploadAsImage(contact: Contact, formatName: String? = null): Image
Content copied to clipboard
将文件作为图片上传后构造 Image.
suspend fun <ERROR CLASS>.uploadAsImage(contact: Contact, formatName: String? = null): Image
Content copied to clipboard
读取 InputStream 到临时文件并将其作为图片上传后构造 Image.
Link copied to clipboard
Link copied to clipboard
Content copied to clipboard
上传文件并获取文件消息.