How To Work Around the Safari Download Location Bug

If you have Safari set to ask you where to save a file each time you download it, but it isn't asking, you are not alone. Here are two ways to work around this bug.
You can also watch this video at YouTube.
Watch more videos about related subjects: Safari (150 videos).

Video Transcript

Hi, this is Gary with MacMost.com. Let's take a look at why sometimes the ask for each download settings in Safari doesn't work. 
So when you click on a download link in Safari to download a file it will automatically download to either your Downloads Folder or another folder that you have specified. But there is also a settings that should ask you to choose a download location and change the file name each time. However, as a lot of people have reported, this often doesn't work.
So here I am in Safari and I'm going to use my site and the download link for the keyboard shortcuts pdf as an example. When I click on this link it should download this pdf. In fact it does. You can see how the little icon jumped from the link into the Dock here because I've got the Downloads Folder in the Dock. Otherwise you may see it jump to here, the little downloads List button that lists downloads. You also find it in your Downloads Folder because that is what I have set as the location for downloads. In fact if I go in Safari and then Settings and then under General I can see my file download location is Downloads. I can change that to another location and send it to any folder I want. So it doesn't have to be the Downloads Folder.
I can also change it to Ask For Each Download. When I do this it should actually prompt me for a location and also allow me to change the name of the file when I download. The problem is it doesn't work! If I click this it works just like before. You can see the file goes to the Downloads Folder and is listed here. It just went to the Downloads Folder and completely ignored my request to Ask Me where to save it instead.
So if you've been frustrated by this you're not alone. A lot of people have experienced this bug and it is inconsistent. Some people report that it works okay. Others report that it works for certain files and not for others. So it appears this really is just a bug in Safari. This feature just doesn't work properly.
By the way, if you find these video valuable consider joining the more than 2000 others that support MacMost at Patreon. You get exclusive content, course discounts, and more. You can read about it at macmost.com/patreon.
So what can you do if you want to actually decide where each file goes as you download it. You've got a couple of options. The first is pretty simple. That is don't simply click on a download link. Instead use two-fingers on a trackpad, a right click on a mouse or you can hold the Control Key and click on the link. This brings up the Context Menu. You'll get Download Link to File here but you also get Download Linked File At and you can see the three dots there. The ellipses in the Menu item indicating that you're going to be prompted for more instructions if you use it. Indeed, if I select this it does allow me now to select a location for the file, I can put it anywhere I want, and I can also change the file name here. So in most cases this will solve the problem. You just have to remember to two-finger click, right click, of Control click to bring up the Context Menu and use Download Linked To File As.
But there are some cases where you can't do that. If a website is scripted to automatically start a download, say, when you go to a new page or by choosing certain things on a dynamic webpage that you have no opportunity to actually click on a link, the page itself triggers the download and you never get to decide that you want to download the linked file as. Instead the download just happens. In that case it saves to your default location, downloads, or to whatever you've set it to.
Fortunately there's a solution in the form of a Terminal Command. You're actually going to use the terminal to change a setting in Safari. A setting that is not actually visible in the Settings window. Here's the command. It's defaults write (which allows you to write a setting) and the set of settings is com.apple.Safari.SandboxBroker. So this defines kind of a part of the settings that you're going to change something. The setting itself is: AlwaysPromptForDownloadFolder. All one word and you can see capitalization matters so make sure you type it exactly. I'll include the code at the post@macmost.com so you can copy and paste this if you want. Then space dash bool, for boolean a true or false value, and the value you want is true. If I set this like that it will work instantly. I don't need to restart Safari or anything like that.
So now look at what happens when I click on this link. It prompts me just like if I had used the Context Menu and Download Linked File As. But I just did a regular click. So now I can choose the location anyway I want here and decide where it goes. I can change the file name if I want. I can click Save or Cancel. By the way if you want to go back to the original setting of not having this turned On you can, of course, use defaults write and set it to False instead of True. But the default is actually not to have the setting there at all. So you can use Defaults Delete and then the exact same set of settings and the exact same setting, like that, to do that. Now it is back like it was. So if I click here you can see it just goes to the Downloads Folder.
So hopefully this video will be short lived and you won't need this in the future as Apple, at some point, fixes this bug and makes it so that when you set it in the Safari Settings it actually obeys your wishes. Until then I hope you find this useful. Thanks for watching.

Here’s the Terminal line:

defaults write com.apple.Safari.SandboxBroker AlwaysPromptForDownloadFolder -bool true

Comments: 4 Comments

    Sheldon
    3 months ago

    Thanks bunches

    Eric Booth
    3 months ago

    In the video you mentioned you would have a copy of the code here. I can't seem to find it.

    3 months ago

    Eric: I've added it above.

    B
    2 months ago

    This worked perfectly. Had to close and re-open Safari for it to take effect but we are finally back to normal. Thanks!

Leave a New Comment Related to "How To Work Around the Safari Download Location Bug"

:
:
:
0/500 (500 character limit -- please state your comment succinctly and do not try to get around this limit by posting two comments)