Servlet MultipartConfig 参数
Servlet MultipartConfig parameters
我正在阅读 MultipartConfig 的官方和非官方文档,但我不明白其参数的使用,特别是这些参数:
MaxFileSize: The maximum size allowed for uploaded files, in bytes. If
the size of any uploaded file is greater than this size, the web
container will throw an exception (IllegalStateException). The default
size is unlimited.
fileSizeThreshold: The file size in bytes after which the file will be temporarily stored on disk. The default size is 0 bytes.
maxRequestSize: The maximum size allowed for a multipart/form-data
request, in bytes. The web container will throw an exception if the
overall size of all uploaded files exceeds this threshold. The default
size is unlimited.
我认为 MaxFileSize 是最大文件大小的值,对吗?但是……其他两个参数呢?谁能换句话解释一下?
谢谢!
fileSizeThreshold: The file size in bytes after which the file will be temporarily stored on disk. The default size is 0 bytes.
上传的文件可以驻留在服务器的内存中或存储到磁盘的某个临时位置,此设置是两种状态之间的阈值。
maxRequestSize: The maximum size allowed for a multipart/form-data request, in bytes. The web container will throw an exception if the overall size of all uploaded files exceeds this threshold. The default size is unlimited.
一个多部分请求可能包含一堆小文件,即总限制=所有上传文件大小的总和。
我正在阅读 MultipartConfig 的官方和非官方文档,但我不明白其参数的使用,特别是这些参数:
MaxFileSize: The maximum size allowed for uploaded files, in bytes. If the size of any uploaded file is greater than this size, the web container will throw an exception (IllegalStateException). The default size is unlimited.
fileSizeThreshold: The file size in bytes after which the file will be temporarily stored on disk. The default size is 0 bytes.
maxRequestSize: The maximum size allowed for a multipart/form-data request, in bytes. The web container will throw an exception if the overall size of all uploaded files exceeds this threshold. The default size is unlimited.
我认为 MaxFileSize 是最大文件大小的值,对吗?但是……其他两个参数呢?谁能换句话解释一下?
谢谢!
fileSizeThreshold: The file size in bytes after which the file will be temporarily stored on disk. The default size is 0 bytes.
上传的文件可以驻留在服务器的内存中或存储到磁盘的某个临时位置,此设置是两种状态之间的阈值。
maxRequestSize: The maximum size allowed for a multipart/form-data request, in bytes. The web container will throw an exception if the overall size of all uploaded files exceeds this threshold. The default size is unlimited.
一个多部分请求可能包含一堆小文件,即总限制=所有上传文件大小的总和。