mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +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:
parent
6a489bb526
commit
83b4b31bf3
2 changed files with 3 additions and 1 deletions
|
|
@ -1 +1 @@
|
||||||
__version__ = '4.5.4'
|
__version__ = '4.5.4-issues129'
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,7 @@ class Message(models.Model):
|
||||||
|
|
||||||
eml = models.FileField(
|
eml = models.FileField(
|
||||||
_(u'Raw message contents'),
|
_(u'Raw message contents'),
|
||||||
|
max_length=2000,
|
||||||
null=True,
|
null=True,
|
||||||
upload_to="messages",
|
upload_to="messages",
|
||||||
help_text=_(u'Original full content of message')
|
help_text=_(u'Original full content of message')
|
||||||
|
|
@ -717,6 +718,7 @@ class MessageAttachment(models.Model):
|
||||||
|
|
||||||
document = models.FileField(
|
document = models.FileField(
|
||||||
_(u'Document'),
|
_(u'Document'),
|
||||||
|
max_length=2000,
|
||||||
upload_to=utils.get_attachment_save_path,
|
upload_to=utils.get_attachment_save_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue