From 565bbf90e4d9894b07a63c0e0c9182f4ee19ebc1 Mon Sep 17 00:00:00 2001 From: Mathias Date: Wed, 20 Dec 2017 21:15:25 +0100 Subject: [PATCH] . --- muk_web_preview_mail/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/muk_web_preview_mail/controllers/main.py b/muk_web_preview_mail/controllers/main.py index 9fae7a5..65b28d8 100644 --- a/muk_web_preview_mail/controllers/main.py +++ b/muk_web_preview_mail/controllers/main.py @@ -106,7 +106,7 @@ class MailParserController(http.Controller): return exception def _make_attachment_response(self, file, filename): - headers = [('Content-Type', mimetypes.guess_type(urllib..request.pathname2url(filename))[0]), + headers = [('Content-Type', mimetypes.guess_type(urllib.request.pathname2url(filename))[0]), ('Content-Disposition', 'attachment; filename="{}";'.format(filename)), ('Content-Length', len(file))] return request.make_response(file, headers) @@ -119,7 +119,7 @@ class MailParserController(http.Controller): else: attachments = [] for file in message["attachments"]: - mimetype = mimetypes.guess_type(urllib..request.pathname2url(file.fname))[0] + mimetype = mimetypes.guess_type(urllib.request.pathname2url(file.fname))[0] extension = os.path.splitext(file.fname)[1] link = self._set_query_parameter(url, "attachment", file.fname) attachments.append(self._Attachment(file.fname, mimetype, extension, link, file.info))