Source: Cross-cutting guide — referencesequa-server/modules/file-storage/used byorganization-endpoints.ts,data-room-endpoints.ts, andmicrosoft-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
Configuration
| Variable | Description |
|---|---|
AWS_S3_ACCESS_KEY | S3 access key |
AWS_S3_SECRET_KEY | S3 secret key |
AWS_S3_REGION | S3 region |
AWS_S3_BUCKET | S3 bucket name |
AWS_S3_UPLOAD_SIZE_LIMIT_MB | Max upload size for organization files (default 10) |
DATA_ROOM_UPLOAD_SIZE_LIMIT_MB | Max upload size for data room files (default 10) |
Upload
Organization File Upload
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canEditDocuments |
| Content-Type | multipart/form-data |
file field.
Size limit: Configurable via AWS_S3_UPLOAD_SIZE_LIMIT_MB (default 10 MB).
Data Room Upload
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canEditDocuments |
| Content-Type | multipart/form-data |
DATA_ROOM_UPLOAD_SIZE_LIMIT_MB (default 10 MB).
Download
Download as Attachment
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canViewFile |
Content-Disposition: attachment. The browser will prompt to save the file.
View Inline
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canViewFile |
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
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canViewDocuments |
Data Room View Inline
| Field | Value |
|---|---|
| Auth | Required |
| Permission | canViewDocuments |
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)
Related
- Wallet Endpoints — blockchain wallet address management (separate from file storage)