Skip to content

feat: watch a FileBrowser Quantum folder as the consume folder - #9

Merged
MattDHill merged 1 commit into
mainfrom
feat/filebrowser-consume
Sep 15, 2026
Merged

MattDHill merged 1 commit into
mainfrom
feat/filebrowser-consume

Conversation

@helix-a

@helix-a helix-a commented Sep 15, 2026

Copy link
Copy Markdown
Member

Closes #8.

Summary

  • New Set Consume Folder action: private folder (the default, unchanged for existing installs) or a subfolder of FileBrowser Quantum's data volume (default paperless). The volume is mounted read-write at /mnt/filebrowser and PAPERLESS_CONSUMPTION_DIR points at the subfolder; the image's own entrypoint creates it. The filebrowser dependency is declared (exists) only while that source is selected — the qbittorrent/metube pattern.
  • Read-write rather than the read-only mount Wire the consume folder to a user-reachable source #8 proposed. consumer.py unlinks the source file inside the same transaction.atomic() that stores the document, so a read-only mount rolls back every import (and leaves the already-written media files behind). Paperless runs as uid 1000, the uid FileBrowser Quantum serves its volume as, so no idmap.
  • Fixes a latent reactive-init bug. bootstrapDatabase built its daemon chain through the same .const() reads as main, so any change to a watched value re-ran the install bootstrap against the live service — the new action would have triggered it on every use (observed on the dev box as a redis port fight). The chain now takes its config as an argument; main reads .const(), the bootstrap .once().
  • Version 2.20.15:5; README and instructions updated; i18n for all five locales.

Nextcloud users get the same drop-to-ingest for free through nextcloud-startos's existing FileBrowser Quantum external-storage mount — see the comment on #3.

Verified on the dev box

  • Fresh install: bootstrap runs once; package start launches a single chain (no __RUN_UNTIL_SUCCESS re-run).
  • Action → FileBrowser Quantum: service restarts, /mnt/filebrowser/paperless created and chowned to paperless, consumer watches it via inotify.
  • A file written from FileBrowser's container was queued within a second, imported (document id 1), and removed from the shared folder.
  • Action → private: restarts, /mnt/filebrowser gone, watching /usr/src/paperless/consume.
  • FileBrowser Quantum uninstalled while selected: the service still starts (StartOS mounts an empty placeholder) — documented; the dependency warning is the signal.
  • Update from the published 2.20.15:4: store gains the new fields with defaults, private folder still watched.

🤖 Generated with Claude Code

Paperless watches a consume folder that nothing on StartOS could reach, so
documents could only arrive through the web UI (#8). A new Set Consume Folder
action points the consumption dir at a subfolder of FileBrowser Quantum's data
volume, mounted read-write at /mnt/filebrowser; the dependency is declared
(`exists`) only while that source is selected, matching qbittorrent and metube.

Read-write, not read-only as the issue proposed: consumption unlinks the source
file inside the same database transaction that stores the document, so a
read-only mount rolls back every import. Paperless already runs as uid 1000,
the uid FileBrowser Quantum serves its volume as, so no idmap is needed.

The install bootstrap built its daemon chain through the same `.const()` reads
as main, which made it a reactive init handler: any change to a watched value
re-ran runUntilSuccess against the live service, and the new action would have
triggered exactly that (observed as a redis port fight on the dev box). The
chain now takes its config as an argument; main reads with `.const()`, the
bootstrap with `.once()`.

Verified on the dev box: a file written from FileBrowser's container is picked
up by inotify, imported, and removed; switching back to the private folder
restarts without the mount; updating from 2.20.15:4 keeps the private folder.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Wire the consume folder to a user-reachable source

2 participants