/api/upload

Upload one or more files. Supports both regular and chunked ("partial") uploads. Quota and folder restrictions may apply.

Info

This endpoint requires authentication.

Note

This endpoint does not support partial uploads. For partial uploads, use the /api/upload/partial endpoint.

POST
Request

Headers

See upload options for headers.

Body

Content-Type: multipart/form-data

All files should be included in the form data with the key file. You can upload multiple files by repeating the file key.

Response

Status: 200 OK

Content-Type: application/json

PropertyTypeDescription
files{ id: string; type: string; url: string; pending?: boolean; }[]Uploaded file(s) info.
pending is true if the file is not fully uploaded (e.g. chunked upload).
deletesAtstring?ISO timestamp when files will be deleted.
assumedMimetypesboolean[]?List indicating if file mimetypes were assumed.

Example

{
"files": [
{
"id": "cmb60pvng00039kentdaw6p68",
"type": "image/png",
"url": "http://localhost:3000/u/brg2IB.png"
}
]
}

Error Responses

  • 400 Bad Request

    • Missing or invalid headers
    • Folder does not exist
    • Partial uploads
    • Malfored upload, missing files, etc.
  • 403 Forbidden

    Folder uploads not allowed for anonymous user

  • 413 Payload Too Large

    Upload would exceed user quota (by file count or by bytes)

  • 500 Internal Server Error

    Unexpected server error while processing upload



Last updated: Aug 20, 2025
Edit this page on GitHub