---
title: Errors and limits
project: OpenFiles
version: 1.0
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/openfiles/1-0/reference/errors/
updated: 2026-11-19T07:45:44.888Z
---

# Errors and limits

> The status codes and error texts of the upload API and its size limits.

Errors come back as a JSON array with one object per error:

```json
[{"error":"Not allowed"}]
```

## Status codes

| Status | Answer | Cause |
|---|---|---|
| `401` | `[{"error":"401: Unauthorized"}]` | No token, or the token is wrong. |
| `400` | `[{"error":"Not allowed"}]` | The token lacks **Upload files** or the storage, or the storage does not exist. |
| `400` | `[{"error":"Invalid file name"}]` | Base64 upload without `name`. |
| `400` | `[{"error":"Invalid file type"}]` | Base64 upload whose `file` is not a data URI. |
| `431` | (no JSON) | The request is larger than the limit. |
| `404` | | A [file link](../file-links/) that does not point to a file. |

See [Token permissions](../../guides/token-permissions/) to fix `Not allowed`.

## Size limits

| Endpoint | Largest request |
|---|---|
| `POST /upload/{db}/`, `POST /files/{db}/` | 100 MB |
| `POST /base64/{db}/` | 10 MB (the Base64 text, which is about a third larger than the file) |

The limit is per request. To upload more data, send the files in several requests.
