3

Is it possible to fine-tune the "Open safe files after downloading" setting in Safari? For example, to make Safari open files like ".ical" et. al., but not Zip-files.

If macOS has no built-in support for this, could a solution be a UNIX script daemon that instantly detects new files in the Downloads directory and opens files with certain extensions?

1 Answer 1

8

The preferences file is located at ~/Library/Preferences/com.apple.DownloadAssessment.plist

If the file doesn't exist, then create it and include the following:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com-PropertyList-1.0.dtd"> 
<plist version="1.0"> 
    <dict> 
        <key>LSRiskCategorySafe</key> 
        <dict> 
            <key>LSRiskCategoryExtensions</key> 
            <array> 
                <string>docx</string> 
                <string>xlsx</string> 
            </array> 
        </dict> 
    </dict> 
</plist>

To exclude Zip files, add the following to the preferences:

<dict> 
    <key>LSRiskCategoryNeutral</key> 
    <dict> 
        <key>LSRiskCategoryExtensions</key> 
        <array> 
            <string>zip</string> 
        </array> 
    </dict> 
</dict>

More info at: Source

5
  • 1
    You can also hold the alt button when clicking a link on a per-download basis
    – adamxweb
    Aug 5, 2018 at 6:54
  • So they thought of it. That's beautiful! Thanks for a quick and precise answer!
    – forthrin
    Aug 5, 2018 at 10:57
  • Not a problem, glad I could help!
    – adamxweb
    Aug 5, 2018 at 13:58
  • 1
    I used this successfully but it does not work on Catalina anymore. Has anybody found how to do this now? Jan 8, 2020 at 12:37
  • 1
    @C.Ramseyer I was able to get it working by adding Safari to Catalina's new security restrictions at: >System Preferences>Security&Privacy>Privacy> Full Disk Access
    – adamxweb
    Jan 15, 2020 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .