mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
email_mirror: Handle encoded attachment filenames.
This commit is contained in:
committed by
Tim Abbott
parent
c44d9f9b1b
commit
785a7ec9e7
@@ -238,7 +238,11 @@ def extract_and_upload_attachments(message: message.Message, realm: Realm) -> st
|
||||
attachment_links = []
|
||||
for part in message.walk():
|
||||
content_type = part.get_content_type()
|
||||
filename = part.get_filename()
|
||||
encoded_filename = part.get_filename()
|
||||
if not encoded_filename:
|
||||
continue
|
||||
|
||||
filename = handle_header_content(encoded_filename)
|
||||
if filename:
|
||||
attachment = part.get_payload(decode=True)
|
||||
if isinstance(attachment, bytes):
|
||||
|
||||
Reference in New Issue
Block a user