From f3bdaae44529a9c754bfb1f22d5f88fa40d821a0 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sun, 12 May 2019 22:12:12 +0200 Subject: [PATCH] Implement inline image/jpeg --- mbox2web | 4 ++++ templates/inline_image_jpeg.html | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 templates/inline_image_jpeg.html diff --git a/mbox2web b/mbox2web index 3f7c130..11ebcc1 100755 --- a/mbox2web +++ b/mbox2web @@ -336,6 +336,9 @@ def render_body(msg, extra=None): } return bodytmpl.render(context) + def render_image_jpeg(msg, extra=None): + return save_part(msg, "inline") + renderers = { "text/plain": render_text_plain, "multipart/mixed": render_multipart_mixed, @@ -355,6 +358,7 @@ def render_body(msg, extra=None): "image/gif": render_image_gif, "multipart/related": render_multipart_related, "application/x-java-vm": render_application_octet_stream, + "image/jpeg": render_image_jpeg, } content_type = msg.get_content_type() content_disposition = msg.get_content_disposition() diff --git a/templates/inline_image_jpeg.html b/templates/inline_image_jpeg.html new file mode 100644 index 0000000..0112846 --- /dev/null +++ b/templates/inline_image_jpeg.html @@ -0,0 +1,8 @@ +
+
+ image/jpeg +
+
+ {{name}} +
+