Skip to main content

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:
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).
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.