In my app (Laravel + Inertia + Vue3) user selects multiple files using input. I need to compress them into zip and upload to server in chunks for further operations.
I tried using JSZip library, but there’s a problem with generateAsync() - when user select big total filesize (for example 500+ files, over 3 gb) then I get error RangeError: Array buffer allocation failed which is caused by the fact that full zip first need to be created in memory and only then it’s being uploaded using chunks.
I don’t want to send files to server and compress them server-side as the goal is to use minimal bandwith.
So the idea is that the zip file should be generated user-side and uploaded using chunks at the same time without the need to store big zip file in memory. Can anyone suggest how to approach that?
generateNodeStream() from JSZIp is a no go as it’s not vastly supported.