mamoe / mirai

高效率 QQ 机器人支持库
https://mirai.mamoe.net
GNU Affero General Public License v3.0
14.5k stars 2.55k forks source link

下载图片失败 #2865

Open JamesLee66 opened 2 months ago

JamesLee66 commented 2 months ago

问题描述

根据imageId构造Image对象,通过String imageUrl = Image.queryUrl(image);获取下载链接,下载链接打不开

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

JamesLee66 commented 2 months ago

使用ExternalResource.uploadAsImage上传的图片可以下载,在qq客户端发送的图片下载不了

shigu666 commented 2 months ago

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