This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

ఇంకా తెలుసుకోండి

Unable to set custom download directory

  • 6 ప్రత్యుత్తరాలు
  • 1 ఈ సమస్య కలిగినది
  • 4 వీక్షణలు
  • చివరి సమాధానమిచ్చినది testphreak

more options

Version: 65.0.2 OS: MacOS 10.14, Ubuntu 18.04

Previously, there was a configuration option to set the download directory using the setting "browser.download.dir". I can't locate it anymore in about:config. Even if I create this entry manually, the file still gets downloaded to the default "Downloads" folder.

I have checked that the path I provide to "browser.download.dir" is valid and have permissions to read/write files from that location.

What do I need to do to allow custom file download location?

Version: 65.0.2 OS: MacOS 10.14, Ubuntu 18.04 Previously, there was a configuration option to set the download directory using the setting "browser.download.dir". I can't locate it anymore in about:config. Even if I create this entry manually, the file still gets downloaded to the default "Downloads" folder. I have checked that the path I provide to "browser.download.dir" is valid and have permissions to read/write files from that location. What do I need to do to allow custom file download location?

ప్రత్యుత్తరాలన్నీ (6)

more options

That setting is available in the standard Firefox settings GUI.

more options

What would that translate to in terms of setting it programmatically?

I have tried - FirefoxOptions firefoxOptions = new FirefoxOptions(); firefoxOptions.addPreference("browser.download.dir", DOWNLOAD_PATH);

This used to work in earlier versions. Trying to figure out what changed and what is the new way of setting the path.

more options

There is :

  • browser.download.dir
  • browser.download.lastDir

These prefs only work if you set not to use the download dir.

  • browser.download.useDownloadDir = false (default)

If this pref is true then files are always downloaded to the default download directory. Note that the default download directory also is used for saving screenshots.

more options

Still doesn't work. Using the latest geckodriver.

Here are the download related options I have set:

FirefoxOptions firefoxOptions = new FirefoxOptions(); firefoxOptions.addPreference("browser.download.folderList", 2); firefoxOptions.addPreference("browser.helperApps.alwaysAsk.force", false); firefoxOptions.addPreference("browser.download.manager.showWhenStarting", false); firefoxOptions.addPreference("browser.helperApps.neverAsk.saveToDisk", "application/octet-stream;application/csv;","application/xls;application/vnd.ms-excel;text/csv;text/calendar"); firefoxOptions.addPreference("browser.helperApps.neverAsk.openFile", "application/octet-stream;application/csv;","application/xls;application/vnd.ms-excel;text/csv;text/calendar"); firefoxOptions.addPreference("browser.download.useDownloadDir", false); firefoxOptions.addPreference("browser.download.dir", DOWNLOAD_PATH);

more options

So your saying in OSX and Linux the switch Download folder isn't working? So where are you downloading the files from?

more options

Yes, that is correct, setting a custom download location (programmatically) is not working. I am downloading a file from a web application.