Skip to content

Instantly share code, notes, and snippets.

@dz0ny
Created February 3, 2011 12:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dz0ny/809418 to your computer and use it in GitHub Desktop.
Save dz0ny/809418 to your computer and use it in GitHub Desktop.
for CR9
function downloadAsBlob () {
var image = new XMLHttpRequest();
image.open('GET', "http://www.google.si/images/logos/ps_logo2a_cp.png", true);
image.responseType = "arraybuffer";
image.onload = function(ev) {
var blob = new BlobBuilder();
blob.append(image .response);
var data = blob.getBlob();
console.log(data.type, data.size)
};
image.send(null);
}
@dz0ny
Copy link
Author

dz0ny commented Feb 3, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment