Created
February 3, 2011 12:32
-
-
Save dz0ny/809418 to your computer and use it in GitHub Desktop.
for CR9
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
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code is from https://github.com/dz0ny/chrome-transmission-remote