export function downloadFileFromBlob(fileName: string, blob: Blob) { const url = window?.URL?.createObjectURL(blob); const link = document.createElement("a"); link.style.display = "none"; link.href = url; link.setAttribute("download", fileName); document.body.appendChild(link); link.click(); setTimeout(() => { document.body.removeChild(link); window.URL.revokeObjectURL(url); }, 200); }