refactor : code cleanliness
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
90d72219ff
commit
f6243f4703
@ -1,11 +0,0 @@
|
|||||||
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