maxUploadsize 和 maxInMemorySize 之间的区别

Difference between maxUploadsize and maxInMemorySize

CommonsMultiPartResolver中n maxUploadSize和maxInMemorySize有什么区别

来自the docs

maxUploadSize: Set the maximum allowed size (in bytes) before uploads are refused. -1 indicates no limit (the default).

maxInMemorySize: Set the maximum allowed size (in bytes) before uploads are written to disk. Uploaded files will still be received past this amount, but they will not be stored in memory. Default is 10240, according to Commons FileUpload.

maxUploadSize:单个请求的最大上传大小。这意味着所有上传文件的总大小不能超过这个配置的最大值。默认为无限制(值为 -1)。但是我们可以通过maxUploadSize及其值属性.

来设置

maxInMemorySize:小于此值的文件存储在内存中,否则直接存储在磁盘中。默认为 10KB(10240 字节)。或者您可以通过 maxInMemorySize 及其值自定义它 属性 .