imjoy-team / ImJoy

ImJoy: Deep Learning Made Easy!
https://imjoy.io
MIT License
182 stars 36 forks source link

Unified Virtual File System #48

Closed oeway closed 5 years ago

oeway commented 5 years ago

Currently, there are two different ways to handle loading/saving files for plugins with or without the plugin engine. For Javascript plugins, file can use browser file dialog to load file and trigger downloads for exporting files. There is no way to persist files in javascript plugins without user interaction. So it would be nice to have a virtual file system which can be fully accessed from javascript.

For Python plugins, files can be directly accessed from the file system. When file urls are generated from the file system, other plugins have to handle differently for files from url or a file object. A virtual file system could potentially unify these different types of files.

Among those different solutions, BrowserFS looks promising for ImJoy.

oeway commented 5 years ago

BrowserFS is added in https://github.com/oeway/ImJoy/commit/e0505564f25955acf75a4205612e15e59fa1ef66