

With the sample code, there is an error every time I try to download a file AND it prompts me to select the download location. I also tried using electron-dl with no better luck. If you ever miss the old days of Windows 95, you don't have to anymore. That's a problem for me, is there a way I can avoid having to choose the location of the file I want to download? (to hardcode a download path to my app folder) Microsoft's legacy operating system is now available to download for free from GitHub as an Electron application. const = require('electron')Ĭonst DownloadManager = require("electron-download-manager") ĭownloadFolder: app.getPath("downloads") + "/my-app" I tried the sample code from electron-download-manager, however I still get a prompt to select the location of the downloaded file. While looking through the different libraries available, electron-dl and electron-download-manager seemed like the two best choices.

If you set a path in the will-download event handler, then Electron will skip displaying the dialog. From here, you can run npm start to start the development server, which will open up the default index.html with the Hello World: You can replace this index.html with your website, and move all of your dependencies over. So maybe this is also helpful to others turning up here. cd to the project directory, and install Electron and its related dependencies with: npm install.

I am building a small Electron app that need to download a file from a link, and put it into the app's folder, without user prompt. I came across this question looking for the opposite effect - how to download a file in an Electron app without showing a save dialog.
