Is your feature request related to a problem? Please describe.
When dropping a large file into egui on the web, eframe always reads the whole file---even if file drop events aren't handled. Drag a particularly large file into egui, and eframe will try to load the whole thing into memory. This isn't ideal.
It would be nice to read dropped files in parts, and only on demand. Seems that Blob.stream() is how JS usually does it, but my knowledge of web is limited.
Is your feature request related to a problem? Please describe.
When dropping a large file into
egui
on the web,eframe
always reads the whole file---even if file drop events aren't handled. Drag a particularly large file into egui, and eframe will try to load the whole thing into memory. This isn't ideal.The code below is problematic:
https://github.com/emilk/egui/blob/ca36f3df6319cbba0e2ab4366d51d97caa9e85b6/crates/eframe/src/web/events.rs#L563-L589
Describe the solution you'd like
It would be nice to read dropped files in parts, and only on demand. Seems that
Blob.stream()
is how JS usually does it, but my knowledge of web is limited.May be related to #3702