I am trying to read a really large file, about 6gb in size, into an arraybuffer using the Response object. Here is my code
function handleFileChange(e) {
const file = e.target.files[0];
new Response(file).arrayBuffer().then(data => console.log(data)).catch(e => console.log(e));
}
When I use this code to read a pretty small file of less than 1gb, this code works just fine, but when trying to read large files, I get this error.
TypeError: Failed to fetch
Is there some kind of size limit to arraybuffer? The error message tells me nothing, so I am not sure where I am going wrong.