org.tinygroup.weblayer.webcontext.parser.upload
接口 UploadConfiguration

所有已知子接口:
UploadService
所有已知实现类:
UploadParameters, UploadServiceImpl

public interface UploadConfiguration

定义UploadService的参数。

作者:
renhui

字段摘要
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()
           
 

字段详细信息

SIZE_MAX_DEFAULT

static final long SIZE_MAX_DEFAULT
默认值:HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。

另请参见:
常量字段值

FILE_SIZE_MAX_DEFAULT

static final long FILE_SIZE_MAX_DEFAULT
默认值:单个文件允许的最大尺寸,超过此尺寸的请求将被抛弃。

另请参见:
常量字段值

SIZE_THRESHOLD_DEFAULT

static final int SIZE_THRESHOLD_DEFAULT
默认值:将文件放在内存中的阈值,小于此值的文件被保存在内存中。

另请参见:
常量字段值
方法详细信息

getRepository

File getRepository()
取得暂存文件的目录。


getSizeMax

org.tinygroup.commons.tools.HumanReadableSize getSizeMax()
取得HTTP请求的最大尺寸,超过此尺寸的请求将被抛弃。单位:字节,值-1表示没有限制。


getFileSizeMax

org.tinygroup.commons.tools.HumanReadableSize getFileSizeMax()
取得单个文件允许的最大尺寸,超过此尺寸的文件将被抛弃。单位:字节,值-1表示没有限制。


getSizeThreshold

org.tinygroup.commons.tools.HumanReadableSize getSizeThreshold()
取得将文件放在内存中的阈值,小于此值的文件被保存在内存中。单位:字节。


isKeepFormFieldInMemory

boolean isKeepFormFieldInMemory()
是否将普通的form field保持在内存里?当sizeThreshold值为0 的时候,该值自动为true


isSaveInFile

boolean isSaveInFile()

getFileNameKey

String[] getFileNameKey()
标准的上传文件请求中,包含这样的内容: Content-Disposition: attachment; filename=xxx.txt 。然而有些不规范的应用,会取fname=xxx.txt。此变量为兼容这种情况而设。



Copyright © 2006–2014 开源组织. All rights reserved.