M
TheMainSt CDN
CDN Node Operational

Unified Static Assets Storage

Fast, isolated asset distribution pipeline for developers. Upload files dynamically and serve them globally from dedicated directories.

Environment Pools
Development DEV
11
Files
4.19 KB
Size
API Upload Token
Copied!
User Acceptance UAT
2
Files
58 B
Size
API Upload Token
Copied!
Production PROD
2
Files
60 B
Size
API Upload Token
Copied!
Developer Integration

API Specification

The CDN upload service endpoint is processed globally. Environment targets are resolved automatically based on your bearer tokens.

Endpoint Details

POST https://cdn.themainst.com/upload

Headers

  • Authorization required
    Standard Authorization Bearer header: Bearer <token>.
  • X-CDN-Token optional alternative
    Custom header option to supply the API key directly.

Parameters (Multipart Form-Data)

  • file File required
    The binary payload of the asset to upload. Supported extensions: images, documents, stylesheets, scripts, media, fonts. Max 50MB.
  • hash Boolean optional
    If true, renames the file to a unique MD5 hash string. Default is false.
  • overwrite Boolean optional
    If true, overwrites the remote file if a collision happens. Otherwise, a unique timestamp is appended.

Code Snippets