mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-25 13:41:50 +02:00
12 lines
307 B
JavaScript
12 lines
307 B
JavaScript
function downloadData(data,fileName) {
|
|
const url=window.URL.createObjectURL(data)
|
|
const a = document.createElement('a');
|
|
a.style.display = 'none';
|
|
a.href = url;
|
|
a.download = fileName;
|
|
document.body.appendChild(a);
|
|
a.click();
|
|
window.URL.revokeObjectURL(url);
|
|
document.body.removeChild(a)
|
|
}
|