I have a situation in my work, where I have to load 800 MB file and send it to the backend. Device running the app will have something about 240 MB of RAM, so probably I can not load the whole file in the browser cause I will get "Out of memory" error. I am trying to find if there's a possible solution to this issue.
Is there a possibility to load file by chunk? Something like:
loadSomehow(fileHandler, { chunk: 1000 }).then(handler => {
while (!handler.done()) {
doSomethingWithChunk(handler.nextChunk());
}
});
Is it even possible to that? I would like to emphasize, that I mean loading file in chunks, not processing it in chunks like in this question. Looks like FileSystemFileHandle's getFile method also returns the whole file at once.