So, im trying to get access to an Iterator over the contents of a file uploaded via an Input field.
I can pass the JS File into Wasm just fine via web-sys, but i cannot for the life of me figure out how to access anything other then length / name of the passed file in Rust.
I think i could pass the whole file into Wasm as a ByteArray and iterate over that, but preferrably i would like to iterate straight over the file contents without copying since the files itself will be quite large (~1 GB).
I found in the Mozilla JS docs that i should be able to access the underlying file blob, get a ReadableStream from that via the .stream() method and get a Reader from that which should be able to be iterated over, but in web-sys, the .getReader() method of the ReadableStream returns a simple JSValue which i can't do anything usefull with.
Am i missing something here or is this functionality simply missing in web-sys or is there some other way to do this? Maybe create the Iterator in JS and pass that to Rust?