Skip to content
New issue

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

希望作者可以增加一个参数 #43

Open
bagefly opened this issue Apr 18, 2021 · 0 comments
Open

希望作者可以增加一个参数 #43

bagefly opened this issue Apr 18, 2021 · 0 comments

Comments

@bagefly
Copy link

bagefly commented Apr 18, 2021

希望作者可以增加一个参数,
pen.paint(() => { var imageBase64 = this.canvas.toDataURL('image/png') this.$emit('success', imageBase64) })
canvas的toDataURL方法里可以动态传入不同的image类型参数。

在项目实践中发现,绘制好的base64图片不是/9j/开头的格式,在传到阿里云OSS空间后,通过企业微信的JSAPI发送图片类型消息,服务端返回了media_id,但是图片发送失败。发现canvas的toDataURL参数传入'image/jpeg'生成的base64图片在企业微信API里发送是没有问题的,这可能是企业微信的限制。

这也许是实际应用场景里的一种需求,希望作者可以考虑采纳一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant