Skip to content

Proposal to Change spring.servlet.multipart.maxFileSize Input Units #31510

@plzprayme

Description

@plzprayme

There is currently an issue with Spring configuration where setting spring.servlet.multipart.maxFileSize to 15MB results in it being set as 15MiB.

image
image

So, propose changing the input units to MiB or adjusting the underlying logic to use 10 * 1000 * 1000, ensuring consistency between the user input and the actual configuration.

While using MB as the unit for file upload size in Spring configuration is quite common, it leads to confusion as the actual unit used is MiB, which is different.

Suggest the following solutions:

Change the input units from MB to MiB, or Modify the underlying Spring configuration logic to use 10 * 1000 * 1000, aligning user input with the actual configuration settings.
These changes will help users to more accurately adjust their file upload settings. We kindly request a discussion to address this issue.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions