We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.1
Windows (64)
None
HTTP
1 | Android Phone
array_push($msg, array( "type" => "node", "data" => array( "name" => "", "uin" => "*", "content" => "[CQ:image,file={base64:https://iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAIAAADJt1n/AAAAKElEQVQ4EWPk5+RmIBcwkasRpG9UM4mhNxpgowFGMARGEwnBIEJVAAAdBgBNAZf+QAAAAABJRU5ErkJggg==}]" ) ), );
这里使用php编写对接api,base64图片使用文档示例图片
成功发送图片
[CQ:image,file=base64:https://iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAIAAADJt1n/AAAAKElEQVQ4EWPk5RmIBcwkasRpG9UM4mhNxpgowFGMARGEwnBIEJVAAAdBgBNAZf QAAAAABJRU5ErkJggg==] 时出现错误: illegal base64 data at input byte 29 将原样发送.
No response
由于使用http对接api,途中图片应该会被转码为url编码的base64 标准编码加密: base64.StdEncoding.EncodeToString(data)
标准编码解密: base64.StdEncoding.DecodeString(str)
url编码加密: base64.UrlEncoding.EncodeToString(data)
url编码解密: base64.UrlEncoding.DecodeString(str)
The text was updated successfully, but these errors were encountered:
这个base64解不出东西来啊,你用一个解码工具就知道了
Sorry, something went wrong.
我是在开发中遇到的这个bug,示例用的base64虽然解不出来东西但是是符合base64规则的,不应该在解码中报错
go 1.20.5 使用 base64.StdEncoding.DecodeString 解码成功 是一张20x21全黑图(大小97B) 传输过程转义的问题吧? AAAAKElEQVQ4EWPk5RmIBcw 丢了个+号,在WPk5hl后面 AZf+QAAA 的+变成空格?
这个base64解不出东西来啊,你用一个解码工具就知道了 go 1.20.5 使用 base64.StdEncoding.DecodeString 解码成功 是一张20x21全黑图(大小97B) 传输过程转义的问题吧? AAAAKElEQVQ4EWPk5RmIBcw 丢了个+号,在WPk5hl后面 AZf+QAAA 的+变成空格?
是的,我就是认为是传输过程中转义的问题,所以我提供了支持url base64的解码方式
No branches or pull requests
请确保您已阅读以上注意事项,并勾选下方的确认框。
go-cqhttp 版本
1.0.1
运行环境
Windows (64)
运行架构
None
连接方式
HTTP
使用协议
1 | Android Phone
重现步骤
这里使用php编写对接api,base64图片使用文档示例图片
期望的结果是什么?
成功发送图片
实际的结果是什么?
[CQ:image,file=base64:https://iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAIAAADJt1n/AAAAKElEQVQ4EWPk5RmIBcwkasRpG9UM4mhNxpgowFGMARGEwnBIEJVAAAdBgBNAZf QAAAAABJRU5ErkJggg==] 时出现错误: illegal base64 data at input byte 29 将原样发送.
简单的复现代码/链接(可选)
No response
日志记录(可选)
No response
补充说明(可选)
由于使用http对接api,途中图片应该会被转码为url编码的base64
标准编码加密: base64.StdEncoding.EncodeToString(data)
标准编码解密: base64.StdEncoding.DecodeString(str)
url编码加密: base64.UrlEncoding.EncodeToString(data)
url编码解密: base64.UrlEncoding.DecodeString(str)
The text was updated successfully, but these errors were encountered: