sendAsFileTo

@JvmName(name = "sendAsFile")
suspend fun <C : FileSupported> ExternalResource.sendAsFileTo(    contact: C,     path: String,     callback: RemoteFile.ProgressionCallback? = null): MessageReceipt<C>

上传文件并发送件消息. 如果要上传的文件格式是图片或者语音, 也会将它们作为文件上传而不会调整消息类型.

需要调用方手动关闭资源.

Since

2.5

See also

Parameters

path

远程路径. 起始字符为 '/'. 如 '/foo/bar.txt'