Chrome allow automatic download

1.3k Views Asked by At

I have a HTML file with javascript which runs locally on my pc. (Not using server!)

When the program runs in error, it creates a log TXT. I am using 'console.save' script.

My problem is that chrome doesn't automatically downloads the second txt, because it asks for permission to download. If I give permission it works but only until I refres the page. After refresh it won't work. I tried in "chrome://settings/content/automaticDownloads" to give permission but it does not work. It's not an URL, it's a "file:///C:/index.html".

In the settings I have only 2 options. To deny the download or to ask for permission. There is no option to allow all downloads.

Is there any way to allow it?

1

There are 1 best solutions below

0
On

In Chrome, go to this url:

chrome://version/

There you can see the Profile path. Go to that location. By default it is:

C:\Users\YOURUSERNAME\AppData\Local\Google\Chrome\User Data\Default

Here, find the Prefrences file. Before editing, close Chrome. Then edit the prefrences file with any text editor and add this:

"default_content_setting_values":{"automatic_downloads":1}

Now Chrome will not ask for permission when it want's to automatically download files.