LIMIT_FILE_SIZE API Origin: Application & API OSI layer 7 · Application Last updated 14 Oct 2026

Upload error: File too large (LIMIT_FILE_SIZE / file exceeds maximum upload size)

The uploaded file is larger than the limit set by the API, framework or server.

Exact message you may see File too largeexceeds the maximum upload sizemay not be greater thanMulterError: File too largefile size limit exceeded
Seen on: REST API

Meaning

Limits exist at several layers: the app (Multer LIMIT_FILE_SIZE “File too large”, Laravel “may not be greater than 2048 kilobytes”), the language runtime (PHP upload_max_filesize / post_max_size), the web server (Nginx client_max_body_size → 413) and the provider (S3 single PUT 5 GB, many APIs 10–100 MB).

The smallest limit wins, so raising one layer isn’t enough if another is lower.

Common causes

  • File genuinely above the documented limit
  • Framework limit lower than the server limit (or vice versa)
  • Multipart overhead or base64 encoding (+33%) pushes it over
  • Proxy/CDN limit in front of the app

⚡ Quick fix

  1. Compress or resize before uploading
  2. Use the provider’s multipart/chunked or resumable upload for large files
  3. Raise the limit at every layer you control (app, PHP, web server, proxy)

Detailed fix by platform

Node.js

  1. const upload = multer({ limits: { fileSize: 20 * 1024 * 1024 } }); // 20 MB

PHP

  1. php
    ; php.ini
    upload_max_filesize = 20M
    post_max_size = 25M

Nginx

  1. client_max_body_size 25m;

How to diagnose

  1. Size — Actual file and request size
  2. Layers — App, runtime, web server, proxy limits
  3. Encoding — Is the file base64-encoded in JSON?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

100 — HTTP 100 Continue (HTTP)100413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413413 (Cloudflare 100 MB) — Cloudflare 413 Request Entity Too Large (upload over the plan limit) (Cloudflare)413 (Cloudflare 100 M…417 — HTTP 417 Expectation Failed (HTTP)417BadDigest — Upload error: checksum mismatch (BadDigest / Content-MD5 did not match / XAmzContentSHA256Mismatch) (API)BadDigestconcurrent_requests_limit — API Error: Too many concurrent requests (concurrency limit reached) (API)concurrent_requests_l…EntityTooLarge — S3 EntityTooLarge: Your proposed upload exceeds the maximum allowed size (AWS)EntityTooLargefile type is not permitted — WordPress: Sorry, you are not allowed to upload this file type / Sorry, this file type is not permitted for security reasons (WordPress)file type is not perm…LIMIT_FIL…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.