Implement inline image/jpeg
This commit is contained in:
parent
f8f64d3506
commit
f3bdaae445
4
mbox2web
4
mbox2web
|
@ -336,6 +336,9 @@ def render_body(msg, extra=None):
|
||||||
}
|
}
|
||||||
return bodytmpl.render(context)
|
return bodytmpl.render(context)
|
||||||
|
|
||||||
|
def render_image_jpeg(msg, extra=None):
|
||||||
|
return save_part(msg, "inline")
|
||||||
|
|
||||||
renderers = {
|
renderers = {
|
||||||
"text/plain": render_text_plain,
|
"text/plain": render_text_plain,
|
||||||
"multipart/mixed": render_multipart_mixed,
|
"multipart/mixed": render_multipart_mixed,
|
||||||
|
@ -355,6 +358,7 @@ def render_body(msg, extra=None):
|
||||||
"image/gif": render_image_gif,
|
"image/gif": render_image_gif,
|
||||||
"multipart/related": render_multipart_related,
|
"multipart/related": render_multipart_related,
|
||||||
"application/x-java-vm": render_application_octet_stream,
|
"application/x-java-vm": render_application_octet_stream,
|
||||||
|
"image/jpeg": render_image_jpeg,
|
||||||
}
|
}
|
||||||
content_type = msg.get_content_type()
|
content_type = msg.get_content_type()
|
||||||
content_disposition = msg.get_content_disposition()
|
content_disposition = msg.get_content_disposition()
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<div class="partouter">
|
||||||
|
<div class="partheader">
|
||||||
|
image/jpeg
|
||||||
|
</div>
|
||||||
|
<div class="partinner">
|
||||||
|
<img src="{{url}}" alt="{{name}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue