3 ms·
Can you allow the user to load and save files?
by richardwhiuk 5y ago
Can you allow the user to load and save files?
- kevincox 5y agoI mean sure, you can get the user to download/upload files, but this is very awkward and not suited for storing every change. (But is good for migrating and backing up the data). Having to get the user to manually break the data out of the browser is not a good UX for day-to-day work. I know that Chrome is pushing for a filesystem API but I don't know if that will be exempt from the usual ephemerality. IIRC it is just a private storage space with a filesystem-like API.
- easrng 5y agoChrome has an API that allows you to save to files without a new download every time. They made a pretty nice library that wraps that API on Chrome and it gracefully degrades on other browsers. https://web.dev/browser-fs-access/ https://web.dev/browser-fs-access/
- jcims 5y agoi noticed this behavior in a drawing app called excalidraw. first save opens a file dialog, subsequent saves just update the file, basically like a standard local text editor. i keep doing 'save as' to create new files because i don't trust it lol