Open JamesLee66 opened 2 months ago
根据imageId构造Image对象,通过String imageUrl = Image.queryUrl(image);获取下载链接,下载链接打不开
String imageId = "{57454715-A857-BAD2-D863-CA717CB64A5B}.jpg"; Image.Builder builder = Image.newBuilder(imageId); builder.setType(ImageType.valueOf(imageMessage.getImageType())); builder.setWidth(imageMessage.getWidth()); builder.setHeight(imageMessage.getHeight()); builder.setSize(imageMessage.getSize()); builder.setEmoji(imageMessage.getEmoji()); Image image = builder.build(); String imageUrl = Image.queryUrl(image);
2.16.0
ANDROID_PAD
No response
使用ExternalResource.uploadAsImage上传的图片可以下载,在qq客户端发送的图片下载不了
见 https://github.com/shigu666/ProjectModdedforMirai/blob/main/Mirai%20core%20%E7%9A%84NT%E5%9B%BE%E5%BA%8A%E6%94%AF%E6%8C%81/Readme.md
问题描述
根据imageId构造Image对象,通过String imageUrl = Image.queryUrl(image);获取下载链接,下载链接打不开
复现
String imageId = "{57454715-A857-BAD2-D863-CA717CB64A5B}.jpg"; Image.Builder builder = Image.newBuilder(imageId); builder.setType(ImageType.valueOf(imageMessage.getImageType())); builder.setWidth(imageMessage.getWidth()); builder.setHeight(imageMessage.getHeight()); builder.setSize(imageMessage.getSize()); builder.setEmoji(imageMessage.getEmoji()); Image image = builder.build(); String imageUrl = Image.queryUrl(image);
mirai-core 版本
2.16.0
bot-protocol
ANDROID_PAD
其他组件版本
No response
系统日志
No response
网络日志
No response
补充信息
No response