Rutwick Gangurde
Rutwick Gangurde

Reputation: 4912

How to save canvas drawing as an image to a folder?

Apologies, this question has been asked multiple times, but asking again due to the lack of a suitable answer. I need to save a canvas drawing as an image in a folder on my server. Can it be done without using AJAX? The toDataURL method returns the image data as base64 encoded. I need to save it to a folder as an image file. Is it possible?

Upvotes: 2

Views: 9506

Answers (1)

showi
showi

Reputation: 486

Response here How To Save Canvas As An Image With canvas.toDataURL()?

or open a new window with data URL:

var data = canvas.toDataURL('image/png');
window.open(data);

You just need to right click it ...

Upvotes: 3

Related Questions