function getFileDownLoad(fileData,fileName){
let blob = new Blob([fileData],{type:"application/pdf"});
// for ie 10+
if (window.navigator.msSaveBlob) {
window.navigator.msSaveOrOpenBlob(blob,fileName);
return;
}
//google
let elink = document.createElement("a");
elink.href = URL.createObjectURL(blob);
elink.download = fileName;
document.body.appendChild(elink);
elink.click()
URL.revokeObjectURL(elink.href);
document.body.removeChild(elink);
}
the project needs to be compatible with ie, and the download file is compatible with blob; the file can be downloaded but ie does not have a file suffix. Is there something wrong with my writing?