# Limiting file upload sizes

Caddy allows you to limit file uploads to a maximum size to prevent abuse

To limit file upload sizes, use the [`request_body` directive](https://caddyserver.com/docs/caddyfile/directives/request_body) from Caddy in your app&#39;s Caddy routes.

```
request_body {
  max_size 10MB
}

# Use the default Caddy routes from Hatchbox
%{default}
```

If the body is larger than the max size, Caddy will return a `413 Content Too Large` response.
