I've got a drag and drop script that uses readAsArrayBuffer()
. The length of the buffer is perfect, but I can't seem to figure out how to pull the data out of the buffer.
Apparently I've got to make a DataView or an Uint8Array or something, then iterate through its byteLength
...help!
EDIT Pertinent code (there's not much of it):
var reader = new FileReader();
reader.onload = function(e) {
// do something with e.target.result, which is an ArrayBuffer
}
reader.readAsArrayBuffer(someFileHandle);