Files

Upload a file (server-proxied)

Changed on

Multipart upload that streams bytes through the server. Used for SVG (server-side DOMPurify sanitization) and raster images (EXIF strip + 256-px webp thumb generation). Capped at 25 MB by the serverless body limit. Larger files MUST use the direct-to-blob token route (POST /api/workspaces/{slug}/files).

post/api/workspaces/{slug}/files/proxy-upload

Request

  • Base URL
    https://trydock.ai
  • Auth
    HTTP bearer

Path parameters

slugstring required

Request body multipart/form-data

surface_slugstring required
parent_folder_idstring
filestring binary

Response

File row

idstring required
namestring required
parentFolderIdstring nullable required
sizeinteger required

Bytes.

mimeTypestring required
thumbUrlstring nullable required

Server-generated 256-px webp URL. Null for non-raster files.

starredboolean
starredAtstring date-time nullable
descriptionstring nullable
tagsstring[]
exifobject nullable
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "id": "cmpfile_…",
  "name": "hero.png",
  "mimeType": "image/png"
}

Changes