Chunked through String.fromCharCode rather than spreading the whole array. fromCharCode(...bytes)
passes every byte as an argument, and a 200 KB chunk is 200,000 arguments -- which overflows the
call stack rather than returning a wrong answer, so it would fail on exactly the large uploads
this module exists to support and pass every small-file test.
Bytes to base64, for the crossing into PHP.
Chunked through
String.fromCharCoderather than spreading the whole array.fromCharCode(...bytes)passes every byte as an argument, and a 200 KB chunk is 200,000 arguments -- which overflows the call stack rather than returning a wrong answer, so it would fail on exactly the large uploads this module exists to support and pass every small-file test.