Ie downloads files in blob format without suffixes?

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?


solve it on your own, fileName+'.pdf' can solve the demand together; is there any other solution? Or is that what ie is like?


fileName can get it directly from the reverse header.
let fileName = res.headers ['content-disposition'] .split (';') [1] .split ('=') [1]

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e486d5-439dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e486d5-439dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?