loam icon indicating copy to clipboard operation
loam copied to clipboard

Add ability to open remote files

Open ddohler opened this issue 6 years ago • 2 comments

This could either be accomplished by modifying loam.open() to detect URLs, or by creating a new method specifically for the purpose of opening remote files.

Either way, the corresponding Emscripten file will need to be created using FS.createLazyFile().

ddohler avatar May 10 '18 12:05 ddohler

FS.createLazyFile() is not a perfect solution here, because the default implementation downloads a megabyte at a time, which can feel sluggish for users. It may be necessary to add a contribution to GDAL core that makes use of Emscripten's fetch() API: https://groups.google.com/forum/#!topic/emscripten-discuss/gMV6_b6oszQ

ddohler avatar Feb 09 '19 01:02 ddohler

Emscripten now has the setting SMALL_XHR_CHUNKS which may make this work better: https://github.com/emscripten-core/emscripten/blob/5ecd2d9d62fd246525d37a4337cfca858b43e3ef/src/library_fs.js#L1704

ddohler avatar Aug 17 '23 13:08 ddohler