Getting byte array through input type = file
[Edit] As noted in comments above, while still on some UA implementations, readAsBinaryString method didn’t made its way to the specs and should not be used in production. Instead, use readAsArrayBuffer and loop through it’s buffer to get back the binary string : document.querySelector(‘input’).addEventListener(‘change’, function() { var reader = new FileReader(); reader.onload = function() { … Read more