Merge pull request #4689 from timvandermeij/ie-attachments

Fixes DownloadManager for IE10 and above
This commit is contained in:
Yury Delendik 2014-04-28 16:31:57 -05:00
commit 6c5a308dcc

View File

@ -68,6 +68,10 @@ var DownloadManager = (function DownloadManagerClosure() {
downloadData: function DownloadManager_downloadData(data, filename,
contentType) {
if (navigator.msSaveBlob) { // IE10 and above
return navigator.msSaveBlob(new Blob([data], { type: contentType }),
filename);
}
var blobUrl = PDFJS.createObjectURL(data, contentType);
download(blobUrl, filename);