Skip to content

Files Library

The Library is the canonical store for images, videos, and PDFs. Items are workspace-scoped, organized into folders, and referenced by ID across posts and AI generations.

Endpoints

GET    /api/v1/files                  list (validated query)
POST   /api/v1/files                  upload (multipart, in-memory, max 50 MB, images/videos)
POST   /api/v1/files/download         pull from a URL
POST   /api/v1/files/folder           create folder
DELETE /api/v1/files                  delete one or many
GET    /api/v1/files/folders          flat folder list

File model

typescript
{
  user: ObjectId,
  pid: ObjectId,            // parent folder
  team_id: ObjectId,
  is_folder: 0 | 1,
  is_image: 0 | 1,
  name: string,
  file: string,             // storage path
  type: string,             // mime
  extension: string,
  size: number,
  width: number,
  height: number,
  note: string,
}

Upload limits

  • 50 MB per request (multer in-memory).
  • Image and video MIME types accepted; the controller filters disallowed types.
  • Per-asset hard caps in the admin panel — see Storage.