Created
May 24, 2012 20:01
-
-
Save jgv/2783870 to your computer and use it in GitHub Desktop.
send image data across domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.getElementById("canvas"), | |
image = canvas.toDataURL("image/png"); | |
$.ajax({ | |
url: "https://app-engine-identifier.appspot.com/upload", | |
type: "POST", | |
data: { imgdata : image }, | |
crossDomain: true, | |
success: function(data){ | |
console.log(data); // yayyy | |
}, | |
error: function(error){ | |
throw error; // ;_; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment