I am using the following JavaScript to convert an HTML5 Canvas to a .PNG image:
function imageMe() {
var canvasImage = document.getElementById("c");
var img = canvasImage.toDataURL("image/png");
document.write('<img src="' + img + '"/>');
}
This requires the user to right click and save the image to a location.
My goal is to have the image saved to a Web Directory (overriding an image with the same name) on click without requiring the user to download and then upload an image.
My question is how do I save the image on click to the correct directory in my Website? Would I still need an Ajax file upload if I am generating an image client side, etc?