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?
Share
See Capture HTML Canvas as gif/jpg/png/pdf? for how to use
toDataURLto 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.