mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
changed the way public filenames (i.e., for download and exporting) are generated. #94
This commit is contained in:
parent
a079c310b4
commit
28622d700d
6 changed files with 55 additions and 34 deletions
|
|
@ -157,7 +157,7 @@ def run_post_consume_script(sender, document, **kwargs):
|
|||
Popen((
|
||||
settings.POST_CONSUME_SCRIPT,
|
||||
str(document.pk),
|
||||
document.file_name,
|
||||
document.get_public_filename(),
|
||||
os.path.normpath(document.source_path),
|
||||
os.path.normpath(document.thumbnail_path),
|
||||
reverse("document-download", kwargs={"pk": document.pk}),
|
||||
|
|
@ -179,7 +179,7 @@ def cleanup_document_deletion(sender, instance, using, **kwargs):
|
|||
f"Deleted file {f}.")
|
||||
except OSError as e:
|
||||
logging.getLogger(__name__).warning(
|
||||
f"While deleting document {instance.file_name}, the file "
|
||||
f"While deleting document {str(instance)}, the file "
|
||||
f"{f} could not be deleted: {e}"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue