I'm reading a file as an array buffer via:
reader.readAsArrayBuffer(myFile);
I'm then taking that array buffer and trying to create a Uint8Array via:
reader.onload = e => {
let arrayBuffer = new Uint8Array(e.target.result, 0,
e.target.result.byteLength);
I've also tried just:
let arrayBuffer = new Uint8Array(e.target.result);
In both cases when I upload a file with a byte length of 198873088 it works fine. However when I try a larger file of 1564725248 i get the following in the first case:
Invalid typed array length: 1564725248
and this in the second case:
Invalid typed array length: undefined
I thought the cap was 2^32 - 1 which would be 42949672995, can anyone explain why there's a problem with the length?