In case you want to limit the users to download files in the Internet zone, you can disable the "File Download" option in the Internet security zone.
By that, users are only able to download files from Local Intranet or from pages that are located in the Trusted Sites.
But there is a special case where the download will fail, although the originating site had been configured to Trusted Sites.
These cases had one common pattern: they were using a blob-download as described in the following article:
- Saving files locally using Blob and msSaveBlob
So taking the Example 1 from the above article, I added http://samples.msdn.microsoft.com to the Trusted Sites, but received the information that the file couldn't be downloaded:
But in case I add "blob" to the Trusted Sites in addition, the Blob-download starts working as the security context of the blob-Object is now explicitly set:
So taking back the content of the script which was used in the samples , here is the relevant part where the relationship to "Blob" gets exposed:
-- snip --
var blobObject = new Blob(["I scream. You scream. We all scream for ice cream."]);
window.navigator.msSaveBlob(blobObject, 'msSaveBlob_testFile.txt'); // The user only has the option of clicking
-- snip --
Note: In addition, Blob-Downloads from pages which are located in the Internet zone will still fail, as the file download is still disabled in that zone.
This blog has been provided by Heiko Mayer from our Browsers Support Team!
This post first appeared on MSDN Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The MSDN Blogs., please read the originial post: here