> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# upload-without-size-limit

> A multer or Nest upload interceptor has no file size limit.

## What it flags

A multer or Nest upload interceptor has no `limits.fileSize`, so one large upload can exhaust memory. A global `MulterModule.register({ limits })` set elsewhere is not visible to the check.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "upload-without-size-limit": "off" }
}
```

The inline fix adds a `MAX_UPLOAD_FILE_SIZE_BYTES` constant and passes it as `limits.fileSize`. An object with a `level` and `options` sets that constant's value. It takes a `maxBytes` option, a positive integer number of bytes. Without the option, the fix uses `10 * 1024 * 1024` (10 MiB).

```json theme={null}
{
  "rules": {
    "upload-without-size-limit": { "level": "warn", "options": { "maxBytes": 52428800 } }
  }
}
```

`level` is required: `"warn"` reports findings without changing the exit code. An `overrides` entry can set a different `maxBytes` for the files it matches, and its options win over the top-level ones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.