Skip to content

bodySize limit option #1363

@SMJSGaming

Description

@SMJSGaming

I wish there was an option just like what bodyParser provides which allows you to limit the total body size rather than per field. This way using memory storage isn't at risk of someone filling your entire RAM with bogus data but still gives you the freedom to spread the data unevenly over different fields without hard capping all fields evenly.

An example:

multer({
    limits: {
        bodySize: Math.pow(1024, 2) * 50
    },
    storage: memoryStorage()
}).any();

Regarding the template question if I want to work on it myself:
I personally don't really have a lot of time to learn the inner workings of this framework to make this feature myself so I'm asking this from others incase anyone is interested in making this idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions