This commit is contained in:
2020-08-22 12:21:18 +02:00
parent 12c3383b55
commit 54e80707b2
11 changed files with 132 additions and 47 deletions

9
src/helpers/files.ts Normal file
View File

@@ -0,0 +1,9 @@
export const downloadLink = (name: string, blob: Blob) => {
const url = URL.createObjectURL(blob);
const downloadLink = document.createElement('a');
downloadLink.href = url;
downloadLink.download = name;
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
};