I have HTML5 canvas where the user has created an image. This is for an image drawing program. I now need to grab the canvas and post it to my server. I also need to post a set of key/value pairs along with the image. Could someone help me with how this is supposed to be done?
Asked
Active
Viewed 256 times
1
-
1possible duplicate of [HTML5 save canvas to file on server](http://stackoverflow.com/questions/3684347/html5-save-canvas-to-file-on-server) – Yoshi May 15 '12 at 16:58
1 Answers
1
See Capture HTML Canvas as gif/jpg/png/pdf? for how to use toDataURL
to turn your canvas into an image (encoded as a data URL) .
Consult the MDN Ajax tutorial to learn how to send data to your server asynchronously.