Comment by mg
17 hours ago
> but trying to save data required hosting it somewhere
With the File System Access API, webpages nowadays can read and write local files just like desktop applications:
https://developer.chrome.com/docs/capabilities/web-apis/file...
Try this text editor for example:
https://googlechromelabs.github.io/text-editor/
It works nicely on Desktop and Mobile.
*In Chrome.
That file editor seems to work in Firefox. I just tested the save/open functionality.
It's not using the File System Access API, on Firefox it uses <input type="file"> for file-picking, and the save just downloads it. It's not synchronizing anything with your filesystem.
4 replies →
It just downloaded the file on my firefox.
*In browsers that have implemented it
My dream is that you could write to Google Drive or iCloud Drive transparently too if the browser allows you to
This is possible with RxDB, you can sync from browser to google drive or ms onedrive
I believe you are able to connect to a Google Drive account with a purely client side site via google oauth and then using the Google Drive rest api. There was an article in particular that I liked that walked through it. Let me see if I can find it
Yes but Google OAuth is a nightmare if you want to "publish" your client so that anyone can use it. If only you use it, you can add yourself as a test user. Just know your access token expires super fast and you will have to frequently re-auth. Its crazy annoying.
Even better how about a fully functional VSCode: https://vscode.dev
The File System Access API makes it possible.