Require fileId unless the agent is iptower
Version: 1.8.0 Date: 2026-10-18
Goal: Legacy POST /documents must not create a deposit without a linked upload, except for Tower.
Solution: Return 400 when the file reference is missing and the agent is absent, ipmagicbox, or any agent other than iptower (case-insensitive). When a reference is present, require a RemoteFile that belongs to the job, matches the hash, and is not already linked.
Features:
Bcyip-Agent: iptower→ file reference optional- Any other agent →
fileId/idUploadrequired - Provided reference is checked before the document is kept
Files Modified:
app/util/documentIngest.js- fileId requirementapp/routes/documents.js- Validate before createapp/services/documents.js- RemoteFile ownership, hash, and link checks
Release fragment: fix-missing-fileid