mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-17 03:11:22 +02:00
Attachement should be readed in binary mode ... and attached as payload (regarding docs)
This commit is contained in:
@ -319,7 +319,8 @@ def ticket_from_message(message, queue, logger):
|
||||
if not name:
|
||||
ext = mimetypes.guess_extension(part.get_content_type())
|
||||
name = "part-%i%s" % (counter, ext)
|
||||
files.append(SimpleUploadedFile(name, encoding.smart_bytes(part.get_payload()), part.get_content_type()))
|
||||
print(name, part.get_content_type())
|
||||
files.append(SimpleUploadedFile(name, part.get_payload(decode=True), part.get_content_type()))
|
||||
logger.debug("Found MIME attachment %s" % name)
|
||||
|
||||
counter += 1
|
||||
|
Reference in New Issue
Block a user