What are the different ways to save a canvas object?
In my research, I found two approaches:
var data = canvas.toDataURL(); var prev = window.location.href; window.location.href = data.replace("image/png", "image/octet-stream"); window.location.href = prev;
Another way is to take a picture.
Are there other ways to do this?
Can I customize the name of the uploaded file?
javascript canvas download
dchhetri
source share