javascript readAsArrayBuffer returns empty Array Buffer
I am trying to read a local file using the FileReader readAsArrayBuffer property. The read is success and in the "onload" callback, I see the Array Buffer object in reader.result. But the Array Buffer is just empty. The length is set, but not the data. How do I get this data? Here is my code <!DOCTYPE html> <html> <body> <input type="file" id="file" /> </body> <script> function handleFileSelect(evt) { var files = evt.target.files; // FileList object var selFile = files[0]; var reader = new FileReader(); reader.onload = function(e) { console.log(e.target.result); }; reader.onerror = function(e)