I am attempting to read in an external .msg file for display. Below is the code I am using to read in the file as a blob and then execute the example code. I have modified line 116 in the example code to set selectedFile to the blob.
This is encountering the following error:
msg.reader.js:420 Uncaught TypeError: Cannot read property 'name' of undefined
at getFieldType (msg.reader.js:420)
at MSGReader.getAttachment (msg.reader.js:553)
at DisplayOutlookMSG.aspx:722
at Function.map (jquery-1.12.0.min.js:2)
at FileReader.fileReader.onload (DisplayOutlookMSG.aspx:721)
var oReq = new XMLHttpRequest();
oReq.open("GET", "https://myDomain.com/myMessage.msg", true);
oReq.responseType = "blob";
oReq.onload = function(oEvent) {
var blob = oReq.response;
blob.name = "myMessage.msg";
//JS code from example.html with line 116 changed to
var selectedFile = blob;
}
I am not able to use FileReader at this time because the page must work with IE 11. Example code showing how to use FileReader may be appreciated by others.