diff --git a/docs/advanced_usage.md b/docs/advanced_usage.md index d4ff80f87..aa111dc2e 100644 --- a/docs/advanced_usage.md +++ b/docs/advanced_usage.md @@ -320,6 +320,7 @@ Paperless provides the following placeholders within filenames: - `{owner_username}`: Username of document owner, if any, or "none" - `{original_name}`: Document original filename, minus the extension, if any, or "none" - `{doc_pk}`: The paperless identifier (primary key) for the document. +- `{customfield}`: Content of custom field. Replace with the id of the custom_field. If custom field is not assigned to document, "-none-" will be set. Paperless will try to conserve the information from your database as much as possible. However, some characters that you can use in document diff --git a/src/documents/tests/test_api_objects.py b/src/documents/tests/test_api_objects.py index 9a0ccd598..4396e725a 100644 --- a/src/documents/tests/test_api_objects.py +++ b/src/documents/tests/test_api_objects.py @@ -187,7 +187,7 @@ class TestApiStoragePaths(DirectoriesMixin, APITestCase): "/{created_month_name_short}/{created_day}/{added}/{added_year}" "/{added_year_short}/{added_month}/{added_month_name}" "/{added_month_name_short}/{added_day}/{asn}/{tags}" - "/{tag_list}/{owner_username}/{original_name}/{doc_pk}/", + "/{tag_list}/{owner_username}/{original_name}/{doc_pk}/{customfield}/", }, ), content_type="application/json",