EML editor

Hello,

I just used the online EML editor, and stumbled across issues which have already been posted here.
So here’s why and how I circumvented it.

The first one, being that nothing happens after file upload (100%).
It’s because the editor is embedded in an iframe with an http:// url
http://products.aspose.app/email/edit?FileName=...
Mixed content policy of browsers doesn’t allow that, as the main page is served over https

So, after having the editor opened, the second issue is that attachements can’t be added.
(No visual errors in the UI but no attachments in the download)
That’s because there’s a Maximum call stack size exceeded error on the base64 conversion.
(As noted here, javascript - ArrayBuffer to base64 encoded string - Stack Overflow, it can happen with the method used)

So, in app.controller.main.js, I replaced

reader.onload = function () {
  data.SourceBase64 = btoa(String.fromCharCode.apply(null, new Uint8Array(this.result)));
}

by

reader.onload = function () {
  let binary = '';
  let bytes = new Uint8Array(this.result);
  for (let i = 0; i < bytes.byteLength; i++) {
    binary += String.fromCharCode(bytes[i]);
  }
  data.SourceBase64 = btoa(binary);
}

to make it work.

Hoping that it will be fixed on your end.
Regards,

1 Like

@MaximeJ

We’ll look into this issue and update the web app.

Hi, I’m having this issue but do not know what you mean by a.constroller.main.js. I cannot find that?

I am trying to add .docx attachments to an .eml with no attachments in.

I appreciate a response ASAP!

Many thanks

@JackAllard

Are you evaluating our online web app or the back-end API?