Skip to content

Commit

Permalink
Merge pull request #48 from lukaszflorczak/master
Browse files Browse the repository at this point in the history
Thank you @lukaszflorczak for your contribution.
  • Loading branch information
kennethjiang authored May 22, 2019
2 parents 431da63 + 8a2b1cf commit a186749
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions file-download.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = function(data, filename, mime) {
var blob = new Blob([data], {type: mime || 'application/octet-stream'});
module.exports = function(data, filename, mime, bom = null) {
var blobData = (bom) ? [bom, data] : [data]
var blob = new Blob(blobData, {type: mime || 'application/octet-stream'});
if (typeof window.navigator.msSaveBlob !== 'undefined') {
// IE workaround for "HTML7007: One or more blob URLs were
// revoked by closing the blob for which they were created.
Expand Down

0 comments on commit a186749

Please sign in to comment.