Saving files locally with electron

If you are targeting multiple platforms, I answered a similar question here. Basically app.getPath(name), app.setPath(name, path), and app.getAppPath() are very useful in saving files to the the right place regardless of the OS.

You may also want to check out these Nodejs packages which help simplify saving files directly to the host machine…

If you intend for users to save files you might also have a look at the Dialog api where you can specifically invoke a save dialog for that purpose.

Leave a Comment