WebAssembly and file upload to a module

Hi
What is the best solution to upload (or stream) a file (selected from a disc) to a wasm module? I would like to pass different files (also big ones) as a binary buffer (in chunks) or stream and consume in the wasm method for further parsing. Here is the test project :
Module2.zip (4.6 KB)
I know that using FileReader and file slice I can read in chunks, but don’t know how to use a buffer in wasm module :

var buffer := new EcmaScriptObject( WebAssemblyCalls.GetArray(buf.Handle, 0) );
how to convert buffer into byte[] or stream variables? The doc doesn’t say much on how to use webassembly API from island rtl.

Regards
Artur