Upload Files
REST endpoint
Section titled “REST endpoint”POST /api/v1/projects/{slug}/storage/uploadHeaders:
Authorization: Bearer {accessToken}Content-Type: multipart/form-dataForm fields:
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The file to upload |
path | string | No | Custom storage path (default: {uuid}.{ext}) |
contentType | string | No | Override MIME type |
public | boolean | No | Make publicly accessible (default: true) |
Response:
{ "url": "https://cdn.aerostack.dev/projects/{slug}/{path}", "key": "projects/{slug}/{path}", "size": 204800, "contentType": "image/jpeg", "createdAt": "2026-03-04T12:00:00Z"}Errors
Section titled “Errors”| Status | Error | Description |
|---|---|---|
400 | MISSING_FILE | No file provided in form data |
400 | FILE_TOO_LARGE | File exceeds 100 MB limit |
401 | UNAUTHORIZED | Missing or invalid token |
413 | — | Request body too large |