embiem / react-canvas-draw

React Component for drawing in canvas
https://embiem.github.io/react-canvas-draw/
MIT License
892 stars 315 forks source link

How to convert the returned stringified object into base64? #114

Open ayako02 opened 3 years ago

ayako02 commented 3 years ago

Is there anyway to convert the returned canvas's stringified object into base64? i couldn't add an ID into the canvas element itself, because it doesnt accept id as a prop. i tried to use toDataURL() function to convert it, but received an error said toDataURL is not a function. Does anyone has any idea on this? because i wanna upload the canvas as an image into AWS S3 bucket... Thanks!

caseymockbee97 commented 3 years ago

https://github.com/embiem/react-canvas-draw/issues/43#issue-527164185

This might help out if you're still working on this.

fsolarv22 commented 3 years ago

https://github.com/embiem/react-canvas-draw/issues/43#issuecomment-809052891