mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-28 19:03:14 +01:00
fix: prepend file attachments with 'part-%i_' to prevent name collisions when an email has attachments with the same filename
This commit is contained in:
parent
406207ff74
commit
9f99eb5ee6
@ -551,6 +551,8 @@ def object_from_message(message, queue, logger):
|
|||||||
if not name:
|
if not name:
|
||||||
ext = mimetypes.guess_extension(part.get_content_type())
|
ext = mimetypes.guess_extension(part.get_content_type())
|
||||||
name = "part-%i%s" % (counter, ext)
|
name = "part-%i%s" % (counter, ext)
|
||||||
|
else:
|
||||||
|
name = ("part-%i_" % counter) + name
|
||||||
|
|
||||||
# FIXME: this code gets the paylods, then does something with it and then completely ignores it
|
# FIXME: this code gets the paylods, then does something with it and then completely ignores it
|
||||||
# writing the part.get_payload(decode=True) instead; and then the payload variable is
|
# writing the part.get_payload(decode=True) instead; and then the payload variable is
|
||||||
|
Loading…
Reference in New Issue
Block a user