File save dialog

Hi, I know there’s FileInput available, but how doable would it be to copy it/modify it/create something else such that it brings up a dialog that would be appropriate for saving a file instead?


There are some standard JS APIs you could use to create and save blobs, e.g. you can see how the SaveTool saves off canvas data. It looks like there are also some libraries like FileSaver.js that could potentially be wrapped as a custom extension.

However, there is a big caveat. AFAIK by default browsers can only save things to a default Downloads folder, for security concerns. On chrome a user may manually enable the Ask where to save each file before downloading option in their settings to see a dialog so save elsewhere, but I am not sure other browsers offer any option at all. So if your expectation is for any user to be able to save things to arbitrary locations out of the box, without changing some settings manually, I think you are out of luck.