Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ var saveAs = _global.saveAs || (
}
} else {
// Support blobs
a.href = URL.createObjectURL(blob)
let binaryData = []
binaryData.push(blob)
a.href = URL.createObjectURL(new Blob(binaryData))
setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s
setTimeout(function () { click(a) }, 0)
}
Expand Down Expand Up @@ -155,7 +157,9 @@ var saveAs = _global.saveAs || (
reader.readAsDataURL(blob)
} else {
var URL = _global.URL || _global.webkitURL
var url = URL.createObjectURL(blob)
let binaryData = []
binaryData.push(blob)
var url = URL.createObjectURL(new Blob(binaryData))
if (popup) popup.location = url
else location.href = url
popup = null // reverse-tabnabbing #460
Expand Down