Feat : Finished CSV export, code might not be clean
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
77f5a566e9
commit
00cb290649
@ -0,0 +1,11 @@
|
|||||||
|
window.downloadFileFromStream = async (fileName, contentStreamReference) => {
|
||||||
|
const arrayBuffer = await contentStreamReference.arrayBuffer();
|
||||||
|
const blob = new Blob([arrayBuffer]);
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const anchorElement = document.createElement('a');
|
||||||
|
anchorElement.href = url;
|
||||||
|
anchorElement.download = fileName ?? '';
|
||||||
|
anchorElement.click();
|
||||||
|
anchorElement.remove();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}
|
Loading…
Reference in new issue