#18 File upload in certain folders

* increases max_size for FileFields --> triggers when the file name will be automatically changed during upload
* adds Http404 Exception in case document file does not exist anymore on the hard drive
This commit is contained in:
mipel
2021-09-01 16:40:36 +02:00
parent 3c9d73533f
commit 270f9ab7d2
4 changed files with 16 additions and 8 deletions

View File

@@ -86,7 +86,8 @@ class RevocationDocument(AbstractDocument):
related_name="document",
)
file = models.FileField(
upload_to=generate_document_file_upload_path
upload_to=generate_document_file_upload_path,
max_length=1000,
)
@property
@@ -334,5 +335,6 @@ class InterventionDocument(AbstractDocument):
related_name="documents",
)
file = models.FileField(
upload_to=generate_document_file_upload_path
)
upload_to=generate_document_file_upload_path,
max_length=1000,
)