Implement inline image/jpeg

This commit is contained in:
Peter J. Holzer 2019-05-12 22:12:12 +02:00
parent f8f64d3506
commit f3bdaae445
2 changed files with 12 additions and 0 deletions

View File

@ -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()

View File

@ -0,0 +1,8 @@
<div class="partouter">
<div class="partheader">
image/jpeg
</div>
<div class="partinner">
<img src="{{url}}" alt="{{name}}">
</div>
</div>