Q: ie display base 64 encoded files in iframe I have a base 64 string and file mime type and file name.
the file can be of various types, such as images, pdf's, office file and ect.
i have an iframe in my html to display the base 64 content.
it runs well in chrome, and shows pdf's, images, text files and downloads docx(which i rather display in iframe too)
the code i used:
viewFile(cont, ftype, fname) {

    let mime = mimeTypes.getType(fname);

 
        var downloadLink = document.createElement('a');
        downloadLink.href = typeof cont === 'string' 
            ? this.createFileStreamForConverting(cont, mime, fname)
            : window.URL.createObjectURL(cont);
            
        if(mime == 'application/pdf')
        {
        const blobUrl = window.URL.createObjectURL(this.b64toBlob(cont, mime));
        downloadLink.href =  blobUrl;
        }
        
        downloadLink.style.display = 'none';
        downloadLink.target = 'origFileViewFrame';
        document.body.appendChild(downloadLink);
        downloadLink.type = mime;
        if(this.isDownloadType(ftype))
          downloadLink.download = fname;
        downloadLink.click();


    }

i tried to run the code on ie and it failed displaying the item with the error:
The data area passed to a system call is too small.
so i searched and saw ie has an issue, that can be solved with using msSaveBlob
if (navigator && navigator.msSaveBlob) {
    navigator.msSaveBlob(cont, fname);
}

but i dont want the file to be downloaded.
is there another way?
also, i want the file to be displayed within the iframe, not in a blank window.
is there something to do?
