Tower deposit with fileKey
Overview
Tower no longer creates a document only after the file is stored under a guessed path. It sends the resolved object key as fileKey on create, uploads the key neo returns, then confirms the draft.
How it works
- Protect stamps the file hash and resolves
storagePath→fileKey. POST /documentswith agentiptowerandfileKeycreates an invisible draft and a remotefile (tower: true). Neo may suffix the key (-2,-3) and returnsstorageKey.- Tower uploads bytes to that
storageKeywith its own credentials. POST /documents/:id/confirmreveals the document so lists, extract, download and proof can see it.
Key files
src/domains/document/document.service.ts— draft create, confirm, remotefiletower: truesrc/domains/document/deposit-key.ts— key suffixessrc/domains/document/older-document.ts— backgroundolderDocumentIdlink
Technical decisions
Box classic deposits still require fileId. Drafts are hidden from lists and extract until confirm. Hash dedup only when noDuplicate is set.