feat(ingestion): submit files to a tenant, originals by hash, draft records #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/38-ingestion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #38 (step 4b, first part: taking files in)
Submission
POST /t/<tenant>/api/tenant/ingestion(curators; multiparttheme+ up to 20files: PDF, text, Markdown, HTML, DOCX, ODT, EPUB, 50 MB each)originals/sha256/<hash>(TenantStorage, credentials read from the sealed secrets inside the tenant scope, endpoint checked against local and private addresses before each call). The same content is stored once.fileHash.Draft records (
TenantIngestion.process)status: draft,rights: unknown,generated.by: process:ingestion, the original as first source (resource,sha256,media_type), an empty body; title from the file name; a free slug (-2,-3…).Queue (
ingestion.sqliteunderTENANT_DATA_PATH)GET /t/<tenant>/api/tenant/ingestionlists the tasks of the tenant.scopeForEnvelope: a tenant suspended, or a curator removed, since the submission is refused.Library: Déposer des fichiers (curators): theme, drop zone, what became of each file, the recent tasks refreshed every 3 s.
Docs: section 10 of
docs/MULTI-TENANCY.md(EN, FR).Next: 4b-2, the analysis by the language model of the tenant (text extraction, summary, metadata, facets), then 4b-3, the À revoir page.
Checks:
yarn test245/245 (11 new: storage by hash, duplicates including legacyfileHash, draft record and its commit, free slugs, foreign task refused, per-tenant topics).yarn buildpasses.tsc --noEmit: the same 11 errors as ondevelop. Not tried against a real S3 nor in a browser.🤖 Generated with Claude Code