|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface UploadConfiguration
定义UploadService的参数。
| 字段摘要 | |
|---|---|
static long |
FILE_SIZE_MAX_DEFAULT
默认值:单个文件允许的最大尺寸,超过此尺寸的请求将被抛弃。 |
static long |
SIZE_MAX_DEFAULT
默认值:HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。 |
static int |
SIZE_THRESHOLD_DEFAULT
默认值:将文件放在内存中的阈值,小于此值的文件被保存在内存中。 |
| 方法摘要 | |
|---|---|
String[] |
getFileNameKey()
标准的上传文件请求中,包含这样的内容: Content-Disposition: attachment; filename=xxx.txt
。 |
org.tinygroup.commons.tools.HumanReadableSize |
getFileSizeMax()
取得单个文件允许的最大尺寸,超过此尺寸的文件将被抛弃。 |
File |
getRepository()
取得暂存文件的目录。 |
org.tinygroup.commons.tools.HumanReadableSize |
getSizeMax()
取得HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。 |
org.tinygroup.commons.tools.HumanReadableSize |
getSizeThreshold()
取得将文件放在内存中的阈值,小于此值的文件被保存在内存中。 |
boolean |
isKeepFormFieldInMemory()
是否将普通的form field保持在内存里? |
boolean |
isSaveInFile()
|
| 字段详细信息 |
|---|
static final long SIZE_MAX_DEFAULT
static final long FILE_SIZE_MAX_DEFAULT
static final int SIZE_THRESHOLD_DEFAULT
| 方法详细信息 |
|---|
File getRepository()
org.tinygroup.commons.tools.HumanReadableSize getSizeMax()
-1表示没有限制。
org.tinygroup.commons.tools.HumanReadableSize getFileSizeMax()
-1表示没有限制。
org.tinygroup.commons.tools.HumanReadableSize getSizeThreshold()
boolean isKeepFormFieldInMemory()
sizeThreshold值为0
的时候,该值自动为true。
boolean isSaveInFile()
String[] getFileNameKey()
Content-Disposition: attachment; filename=xxx.txt
。然而有些不规范的应用,会取fname=xxx.txt。此变量为兼容这种情况而设。
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||