Skip to content

Commit

Permalink
Merge a586270 into e00f5ea
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bonani authored Apr 27, 2021
2 parents e00f5ea + a586270 commit 63c8f42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"css-loader": "^1.0.0",
"es6-object-assign": "1.1.0",
"file-loader": "2.0.0",
"file-saver": "^2.0.5",
"get-float-time-domain-data": "0.1.0",
"get-user-media-promise": "1.1.4",
"immutable": "3.8.2",
Expand Down
9 changes: 6 additions & 3 deletions src/lib/download-blob.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export default (filename, blob) => {
const downloadLink = document.createElement('a');
document.body.appendChild(downloadLink);

var FileSaver = require('file-saver');
saveAs(blob, filename);
/*
// Use special ms version if available to get it working on Edge.
if (navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(blob, filename);
Expand Down Expand Up @@ -29,7 +31,8 @@ export default (filename, blob) => {
};
reader.readAsDataURL(blob);
}

// Special use on Ipad ThymioSuite
if (/ipad/i.test(navigator.userAgent)) {
var reader = new FileReader();
Expand All @@ -39,5 +42,5 @@ export default (filename, blob) => {
window.webkit.messageHandlers.blobReady.postMessage({data: base64data, filename: filename});
}
}

*/
};

0 comments on commit 63c8f42

Please sign in to comment.