Reference
Limits
File size, deploy size, and filetype rules — what's enforced when you publish or edit.
Limits
Div enforces a few limits when you save or publish files — both via div deploy from the CLI and the in-browser editor at div.so. Here's what to know.
#File size
Per-file cap: 10 MB.
The same cap applies on both surfaces:
div deploy— a file larger than 10 MB is dropped from the deploy with a warning; the rest of the deploy proceeds normally.- In-browser editor — saving a file larger than 10 MB shows a toast (
"File too large — the limit is 10 MB per file.") and the save is skipped. Your previous saved version stays intact.
If you have a single file that's flirting with the cap, consider:
- Images — run them through an optimizer (
squoosh.app,imagemin, or your image editor's "Save for web" option). A 12 MB DSLR photo is almost certainly being served at higher resolution than your visitors will ever see. - Videos — host them somewhere that does adaptive bitrate streaming (YouTube, Vimeo, Mux) and embed. Div is not a video host.
- Fonts — modern variable fonts are a few hundred KB. If your font file is multiple MB, you're probably shipping a font with too many weights or scripts; subset it.
#Total deploy size
Per-deploy cap: 50 MB.
The sum of all files in a single div deploy can't exceed 50 MB. This is checked before any upload starts — so if you're over, the CLI bails cleanly:
✕ This deploy is 73.2 MB. The cap is 50.0 MB per deploy — compress images or drop unused assets and try again.
The cap is per-deploy, not per-project. There's no cumulative limit on the total size of files stored across all your deploys (though projects with absurd amounts of state are obviously going to be a conversation eventually).
#File types
Div uses an allowlist: only the file types below are accepted. Anything else is dropped from a div deploy with a warning (the rest of the deploy proceeds normally), and rejected with a toast in the in-browser editor.
| Category | Extensions |
|---|---|
| Web | .html, .htm, .css, .js, .mjs, .json, .map, .wasm, .xml |
| Images | .svg, .png, .jpg, .jpeg, .gif, .webp, .avif, .ico, .bmp |
| Fonts | .woff, .woff2, .ttf, .otf, .eot |
| Media | .mp4, .webm, .mp3, .ogg, .wav, .m4a |
| Docs | .txt, .md, .pdf |
The match is on the last extension only and is case-insensitive, so archive.tar.gz is treated as .gz (not allowed) and IMAGE.PNG works fine.
If you need a file type not on this list, get in touch — for genuinely web-useful formats we'll add them. Types we won't add: archives (.zip, .tar.gz, .7z), executables (.exe, .dmg, .apk), and similar "doesn't belong on a website" formats.
The allowlist is checked both in the CLI (so you find out quickly) and on the server (so it's not a soft guard you can bypass).
#Path rules
- No absolute paths. Every file's path is relative to the project root. A path starting with
/is rejected. - No
..segments. Path traversal (e.g.../../etc/passwd) is rejected. - No empty segments. Paths like
foo//barare rejected. - Path length: 512 characters max.
These are enforced on the server side and would be a CLI bug if you ever saw one — but they're listed here for completeness.
#Deploy frequency
There's a rate limit on the API: about 2 deploys per minute per IP. If you somehow exceed it:
✕ Too many requests. Wait a minute and try again.
In normal usage you're nowhere near this. The limit exists to keep automated abuse from grinding up the slug namespace.
#What's not limited
- Total project size (cumulative across deploys) — no cap today.
- Number of files in a single deploy — no specific cap, but the 50 MB total limit and the 10 MB per-file limit imply a practical ceiling.
- Number of projects per account — no cap today.
- Bandwidth / requests served — no cap today. We reserve the right to introduce one for projects that get unexpectedly viral, but the goal is for it to never affect normal use.
#See also
.divignore— the way to keep large files out of deploys.div deploy— where these limits are enforced.- Troubleshooting — what to do when you bump into one.