-
Notifications
You must be signed in to change notification settings - Fork 90
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
希望作者可以增加一个参数,
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里发送是没有问题的,这可能是企业微信的限制。
这也许是实际应用场景里的一种需求,希望作者可以考虑采纳一下。
The text was updated successfully, but these errors were encountered: