Skip to content

Support recursive directory ingestion for Kubernetes-friendly Paperless drops #15

Description

@alcxyz

Context

During the Paperless Kubernetes/Longhorn migration, we intentionally stopped relying on an NFS-mounted consume directory. The old workflow allowed dropping a directory tree into a watched folder and letting Paperless ingest files recursively. That is useful, but shared host mounts make the deployment node-coupled.

Paperflow already provides the better direction because it can upload through Paperless APIs instead of requiring Paperless and the drop location to share a filesystem. The missing feature is recursive directory ingestion.

Goal

Allow Paperflow to accept a directory path and recursively ingest supported files from that directory and its subdirectories into Paperless. This should preserve enough path context to make bulk folder drops understandable after upload.

Desired behavior

  • Accept one or more directory paths as input.
  • Walk directories recursively.
  • Upload files through the existing Paperless API flow.
  • Skip hidden/temp/system files by default.
  • Avoid deleting source files unless an explicit destructive option is provided.
  • Surface per-file success/failure summary.
  • Make it practical to run as a user service, CLI command, or future Kubernetes job without mounting Paperless consume storage.

Kubernetes motivation

A recursive API-based ingestion path avoids needing RWX/NFS just to keep a drop folder working. This keeps Paperless node agnostic while retaining the convenience of dropping a folder tree for ingestion.

Open questions

  • Should original relative path be mapped to Paperless tags, custom fields, correspondent hints, or just included in logs?
  • Should recursive ingest be watch-based, one-shot, or both?
  • Should duplicates be detected locally before upload, or left to Paperless?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions