-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Native File System API saving/exporting and opening #388
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/vjeux/excalidraw/46fhrv325 |
To test, make sure you have the approriate flag set. Before you deploy, make sure you add an actual origin trial token instead of the placeholder. |
I enabled the flag, clicked save and open but I don't see any difference. It seems to open the file picker the exact same way as before. Could you educate me on what is the advantage of the new file system API? |
Actually, before it didn't show a file save dialog during save (at least on Win7). And during open, it narrowed down files to As I understand it, the new FS API should in the long run (but not as of yet) allow saving/reading from a file without having to re-select the file? I.e. it should support |
The Native File System API allows for true saving at arbitrary locations, whereas the legacy approach always downloads to the Downloads folder. You also can’t overwrite an existing file. |
Writing back to the originally opened file is possible if you keep the file handle. Is this wanted? |
Opening should actually filter on |
Thanks, that makes sense! And yeah, I can see the ability to save to a specific location indeed! I'm supportive of it. Please add the right token and you can merge it. |
This now reuses an open file handle, so the flow is super natural (open, edit, save). I also fixed an issue with the open dialog that indeed didn't filter on |
Fixes #169
This PR adds Native File System API to Excalidraw. On compatible user agents it will use the new API, on other user agents it will fall back to the legacy approach.