Skip to main content
Version: 1.5.0

Document access for Tower presign

Overview​

IP MagicBox (and web) download a Tower deposit by asking Tower for a short-lived signed GET URL. Neo must tell Tower whether the caller can read the document, which company it belongs to, and whether the remotefile is Tower-owned.

How it works​

  1. Box calls Tower POST /api/v1/files/presign with the user Bearer token and documentId.
  2. Tower calls neo GET /documents/:id with that same user token (disposable web token only for that call when needed).
  3. Neo returns the document only if the user can read it, plus companyId and fileId.tower (and remote/target).
  4. Tower checks companyId against its activation, Heads the object with Tower credentials, and returns a signed GET URL.

Key files​

  • src/domains/document/document.controller.ts — GET /documents/:id
  • src/domains/document/document.service.ts — getAccessibleDocument
  • src/domains/document/document.responses.ts — fileId.tower, companyId

Technical decisions​

Neo does not sign the Box download. Storage secrets stay on Tower. tower: true on the remotefile (or legacy FTP/TOWER markers on the Box side) selects this path.