expressjs / expressjs/multer

Field minSize and maxSize

Open
#147 4 comments 0 reactions 0 assignees View on GitHub
enhancement future
Dominant language
JavaScript
Stars
12.1k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
21

Description

To filter useless files with respect to my application, a lower file size limit would be useful.

Example: I will never receive files smaller than 1MB.

Reasoning: This would be cleaner, than checking the file size manually in `onFileUploadComplete`.

Proposal (backwards compatible):

```
limits: {
fileSize: [LOWER-LIMIT, UPPER-LIMIT]
}

limits: {
fileSize: UPPER-LIMIT
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.