mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-16 10:57:58 +02:00
Add attachment validator when uploading attachment to tickets
This commit is contained in:
@ -30,6 +30,8 @@ import uuid
|
||||
|
||||
from helpdesk import settings as helpdesk_settings
|
||||
|
||||
from .validators import validate_file_extension
|
||||
|
||||
from .templated_email import send_templated_mail
|
||||
|
||||
|
||||
@ -1022,6 +1024,7 @@ class Attachment(models.Model):
|
||||
_('File'),
|
||||
upload_to=attachment_path,
|
||||
max_length=1000,
|
||||
validators=[validate_file_extension]
|
||||
)
|
||||
|
||||
filename = models.CharField(
|
||||
|
Reference in New Issue
Block a user