From 0c7674e55b33e7f3a80d64bfa7a42db080e9e777 Mon Sep 17 00:00:00 2001 From: tsia Date: Fri, 5 Feb 2021 17:52:50 +0100 Subject: [PATCH] add Support for application/x-pdf mime type --- src/documents/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/mail.py b/src/documents/mail.py index d54b387b7..f43f6604c 100644 --- a/src/documents/mail.py +++ b/src/documents/mail.py @@ -130,7 +130,7 @@ def file_name(self): class Attachment(object): SAFE_SUFFIX_REGEX = re.compile( - r"^(application/(pdf))|(image/(png|jpeg|gif|tiff))$") + r"^(application/(?:x-)?(pdf))|(image/(png|jpeg|gif|tiff))$") def __init__(self, data, content_type):