I am creating a script that lets you download a CSV File of current table on the page like this:
var downloadLink = document.createElement("a");
var blob = new Blob(["", CSVString], {type: 'text/csv;charset=utf-8'});
if (navigator.appVersion.toString().indexOf('.NET') > 0) {
window.navigator.msSaveOrOpenBlob(blob, "Daten.csv");
}
else {
downloadLink.href = window.URL.createObjectURL(blob);
downloadLink.download = "Daten.csv";
downloadLink.style.display = 'none';
document.body.appendChild(downloadLink);
downloadLink.click();
}
Now if I use IE it asks if I want to download a file from localhost, but in Mozilla Firefox the download window says "From: blob:". Can it be changed to show the host name or a name that I specify (e.g. Test)?