mirai-core / net.mamoe.mirai.message / uploadImage

uploadImage

suspend fun Contact.uploadImage(bufferedImage: BufferedImage): OfflineImage

Dispatchers.IO 中将图片上传, 但不发送. 不会保存临时文件

Exceptions

OverFileSizeMaxException -

suspend fun Contact.uploadImage(imageUrl: URL): OfflineImage

Dispatchers.IO 中下载 URL 到临时文件并将其作为图片上传, 但不发送

Exceptions

OverFileSizeMaxException -

suspend fun Contact.uploadImage(imageInput: Input): OfflineImage

Dispatchers.IO 中读取 Input 到临时文件并将其作为图片上传, 但不发送

Exceptions

OverFileSizeMaxException -

suspend fun Contact.uploadImage(imageStream: InputStream): OfflineImage

Dispatchers.IO 中读取 InputStream 到临时文件并将其作为图片上传, 但不发送

Exceptions

OverFileSizeMaxException -

suspend fun Contact.uploadImage(file: File): OfflineImage

Dispatchers.IO 中将文件作为图片上传, 但不发送

Exceptions

OverFileSizeMaxException -