Skip to main content
Source: Cross-cutting guide — references equa-server/modules/file-storage/ used by organization-endpoints.ts, data-room-endpoints.ts, and microsoft-endpoints.ts

File Storage Endpoints

Equa uses Amazon S3 for file storage. The file storage module provides upload middleware, download handlers, and file management utilities used across multiple endpoint groups.

Architecture

The file storage module (file-storage) is a shared library used by:
  • Organization endpoints — organization-level file uploads
  • Data Room endpoints — data room document uploads
  • Microsoft endpoints — hybrid Microsoft/S3 document storage
  • Cap Table endpoints — certificate PDF storage
Files are stored in S3 with the bucket and credentials configured via environment variables.

Configuration

Upload

Organization File Upload

Upload a file to the organization’s S3 storage. The upload middleware handles multipart parsing and streams the file to S3. Request: Multipart form with a file field. Size limit: Configurable via AWS_S3_UPLOAD_SIZE_LIMIT_MB (default 10 MB).

Data Room Upload

Upload documents to the data room. Supports multiple file uploads. Size limit: Configurable via DATA_ROOM_UPLOAD_SIZE_LIMIT_MB (default 10 MB).

Download

Download as Attachment

Download a file from S3 with Content-Disposition: attachment. The browser will prompt to save the file.

View Inline

Serve a file from S3 with Content-Disposition: inline. The browser will attempt to display the file (PDFs, images). The :name parameter is used for the filename in the response headers and does not affect which file is served.

Data Room Download

Download a data room document as an attachment.

Data Room View Inline

View a data room document inline in the browser.

Upload Middleware

The file storage module provides reusable upload middleware:
  • uploadMiddlewareUsingMemory — parses multipart uploads into memory buffers before uploading to S3
  • Supports configurable max file size in megabytes
  • Supports single or multiple file uploads (UploadPlurality.single / UploadPlurality.multiple)
  • Wallet Endpoints — blockchain wallet address management (separate from file storage)