mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 07:45:32 +01:00
proper filenames for originals and archived documents
This commit is contained in:
parent
64180b5668
commit
17a581495c
2 changed files with 7 additions and 1 deletions
|
|
@ -241,6 +241,10 @@ class Document(models.Model):
|
|||
def file_name(self):
|
||||
return slugify(str(self)) + self.file_type
|
||||
|
||||
@property
|
||||
def archive_file_name(self):
|
||||
return slugify(str(self)) + ".pdf"
|
||||
|
||||
@property
|
||||
def file_type(self):
|
||||
return mimetypes.guess_extension(str(self.mime_type))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue