Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

[Other] include ASN in download file name #1685

Open
cdpb opened this issue Mar 11, 2022 · 4 comments
Open

[Other] include ASN in download file name #1685

cdpb opened this issue Mar 11, 2022 · 4 comments

Comments

@cdpb
Copy link

cdpb commented Mar 11, 2022

Hello,

currently when you download a document the filename syntax is something like:

DATE_CORRESPONDENT_FILENAME.pdf

is it possible to change it in a way, so it contains the ASN, if set?

I found PAPERLESS_FILENAME_FORMAT but it seems to only influence the way documents are stored internally, correct?

Thanks for the help

@Cantello
Copy link

PAPERLESS_FILENAME_FORMAT should change the file name and as there is no 'internal' or 'external' file name, you should be able to download the file with the ASN included, provided you have set it in the format rule.
If this does not work, it might be necessary to invoke document_renamer prior to downloading the file, this will rename all your filed according to the format you have set.

@cdpb
Copy link
Author

cdpb commented Mar 19, 2022

Thanks for the support @Cantello .
I changed the env variable PAPERLESS_FILENAME_FORMAT to include the ASN and invoke document_renamer again.
All the documents are now nicely renamed, but if I download them the format is different, well unmodified in it's original state like so DATE_CORRESPONDENT_FILENAME.

It must be a frontend setting how to change the filename, giving the internal document number.

My python skills are limited, but it shouldn't be a problem to find the line where and how the download process get's initialized.

@Cantello
Copy link

Another option would be to use the exporter: document_exporter target_folder -f (-f being used to force PAPERLESS_FILENAME_FORMAT for the exported docs).

@piraterx
Copy link

Ya I wish there is way to change download filename just like saving those documents.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants