Implement attachment text/x-python

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

View File

@ -93,6 +93,7 @@ def save_part(msg, disposition):
"application/pgp-keys": ".pgp", "application/pgp-keys": ".pgp",
"application/x-gunzip": ".gz", # that sort of makes sense, but not really "application/x-gunzip": ".gz", # that sort of makes sense, but not really
"image/jpeg": ".jpg", "image/jpeg": ".jpg",
"text/x-python": ".py",
}[content_type] }[content_type]
name = msg.get_param("name") or "(data)" name = msg.get_param("name") or "(data)"

View File

@ -0,0 +1,8 @@
<div class="partouter">
<div class="partheader">
text/x-python
</div>
<div class="partinner">
<a href="{{url}}">{{name}}</a>
</div>
</div>