ingest: Assign uploaded documents to a configurable Paperless owner
The post_document endpoint does not support setting ownership on upload,
so after a successful upload the document is PATCHed to set the owner.
Add optional PAPERLESS_OWNER_ID env var. When set, every newly uploaded
document is assigned to that Paperless user ID via PATCH /api/documents/{id}/.
This commit is contained in:
parent
0aa044eead
commit
f49ea1dbc5
2 changed files with 30 additions and 6 deletions
|
|
@ -7,6 +7,8 @@ MATRIX_ROOM_ID=!roomid:jeena.net
|
|||
PAPERLESS_URL=https://paperless.jeena.net
|
||||
PAPERLESS_TOKEN=your_paperless_api_token
|
||||
PAPERLESS_INBOX_TAG_ID=1
|
||||
# Optional: assign uploaded documents to this Paperless user ID
|
||||
# PAPERLESS_OWNER_ID=7
|
||||
|
||||
# Optional: path to the SQLite state database (default: state.db next to the script)
|
||||
DB_PATH=state.db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue