1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 14:32:34 +02:00

ISSUES-129: Increased to FileField(max_length=2000) from max_length=100 which was too short.

The MailAttachment.document field is too short & raises the error below. The default FileField(..., max_length=100) does not hold long enough filenames.
Can MailAttachment.document accept a configured max_length, or have the default set higher?

ERROR: [django.security.SuspiciousFileOperation: 204] Storage can not find an available filename Please make sure that the corresponding file field allows sufficient "max_length".
This commit is contained in:
Droffner, Andrew (ad718x) 2017-03-03 13:38:19 -05:00 committed by Adam Coddington
parent 6a489bb526
commit 83b4b31bf3
2 changed files with 3 additions and 1 deletions

View file

@ -1 +1 @@
__version__ = '4.5.4'
__version__ = '4.5.4-issues129'

View file

@ -482,6 +482,7 @@ class Message(models.Model):
eml = models.FileField(
_(u'Raw message contents'),
max_length=2000,
null=True,
upload_to="messages",
help_text=_(u'Original full content of message')
@ -717,6 +718,7 @@ class MessageAttachment(models.Model):
document = models.FileField(
_(u'Document'),
max_length=2000,
upload_to=utils.get_attachment_save_path,
)