Skip to content
Snippets Groups Projects
Commit 63a55ec0 authored by Markin Igor's avatar Markin Igor
Browse files

Log

parent 0bb04512
No related branches found
No related tags found
1 merge request!72Fix attachment image
...@@ -302,7 +302,9 @@ export function getHTML(mime, parts) { ...@@ -302,7 +302,9 @@ export function getHTML(mime, parts) {
} }
contentDisposition = contentDisposition[0]; contentDisposition = contentDisposition[0];
if (contentDisposition.indexOf("attachment") >= 0 || contentDisposition.indexOf("inline") >= 0) { if (contentDisposition.indexOf("attachment") >= 0 || contentDisposition.indexOf("inline") >= 0) {
let contentId = getHeaderValue("content-id", parts[i]); let contentId = getHeaderValue("content-id", parts[i]);
console.log("CID", contentId);
if (contentId === null || contentId === undefined) { if (contentId === null || contentId === undefined) {
continue; continue;
} }
...@@ -315,9 +317,12 @@ export function getHTML(mime, parts) { ...@@ -315,9 +317,12 @@ export function getHTML(mime, parts) {
if (contentType === null || contentType === undefined) { if (contentType === null || contentType === undefined) {
continue; continue;
} }
console.log("CID2", contentId);
contentType = contentType[0]; contentType = contentType[0];
console.log("ContentTYpe", contentType);
const normalizedBody = getBody(mime, parts[i]).replace(newline, ""); const normalizedBody = getBody(mime, parts[i]).replace(newline, "");
const src = "data:" + contentType + ";base64, " + normalizedBody; const src = "data:" + contentType + ";base64, " + normalizedBody;
console.log("SRC", src);
html = html.split(contentId).join(src); html = html.split(contentId).join(src);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment