Closed xiaogaozi closed 2 years ago
回退到版本 0.27.0 后,也发现这个问题。
"dependencies": {
"gerror": "^1.0.16",
"wechaty": "^0.68.1",
"wechaty-puppet-wechat": "0.27.0"
}
打印 FileBox 信息:
其中 remoteUrl 也可以点击访问,但是下单后的文件依然是 0 kb。
Please try the latest version of wechaty-puppet-wechat@1.11.9+ and let me know if this problem exists in the latest version.
Please try the latest version of wechaty-puppet-wechat@1.11.9+ and let me know if this problem exists in the latest version.
@huan The fix version should be wechaty-puppet-wechat@1.11.10+ 🤔️ Users using version 0.x but do not want to upgrade to 1.x can rebuild FileBox to solve this problem:
const box = await msg.toFileBox()
const newBox = FileBox.fromUrl(box.remoteUrl.replace(/^http/i, 'https'), box.name, {
...box.headers,
Referer: box.headers.Referer.replace(/^http/i, 'https'),
})
Awesome, your workaround is very smart!
Thank you very much for helping the community to fix the bug and confirm it works, appreciate it!
Close this issue because it has been fixed by @pacoyang
@pacoyang 请问对应的 wechaty 版本是多少呢?
@pacoyang 请问对应的 wechaty 版本是多少呢?
这个 issue 跟 wechaty 版本没有联系,可以用最新的 wechaty@1.10.4
When receiving messages from other people about files (including images, videos, attachments, etc.), downloading to local disk using the
FileBox.toFile()
API always results in a file size of 0.This issue was only recently discovered, and was only occasionally occurring before, but is now 100% reproduced.
Some context: