public class AdaptiveFileUploadFactory extends java.lang.Object implements FileUploadFactory
AdaptiveFileUpload
.Modifier and Type | Field and Description |
---|---|
protected boolean |
allowFileExtensions |
protected boolean |
breakOnError |
protected java.lang.String[] |
fileExtensions |
protected int |
maxFileSize |
protected int |
memoryThreshold |
protected java.io.File |
uploadPath |
Constructor and Description |
---|
AdaptiveFileUploadFactory() |
Modifier and Type | Method and Description |
---|---|
AdaptiveFileUploadFactory |
breakOnError(boolean breakOnError)
Specifies if upload should break on error.
|
FileUpload |
create(MultipartRequestInputStream input)
Creates new instance of
uploaded file . |
int |
getMaxFileSize() |
int |
getMemoryThreshold() |
java.io.File |
getUploadPath() |
boolean |
isBreakOnError() |
AdaptiveFileUploadFactory |
setBreakOnError(boolean breakOnError) |
AdaptiveFileUploadFactory |
setFileExtensions(java.lang.String[] fileExtensions,
boolean allow)
Allow or disallow set of file extensions.
|
AdaptiveFileUploadFactory |
setMaxFileSize(int maxFileSize)
Sets maximum file upload size.
|
AdaptiveFileUploadFactory |
setMemoryThreshold(int memoryThreshold)
Specifies per file memory limit for keeping uploaded files in the memory.
|
AdaptiveFileUploadFactory |
setUploadPath(java.io.File uploadPath)
Specifies the upload path.
|
protected int memoryThreshold
protected java.io.File uploadPath
protected int maxFileSize
protected boolean breakOnError
protected java.lang.String[] fileExtensions
protected boolean allowFileExtensions
public FileUpload create(MultipartRequestInputStream input)
uploaded file
.create
in interface FileUploadFactory
public int getMemoryThreshold()
public AdaptiveFileUploadFactory setMemoryThreshold(int memoryThreshold)
public java.io.File getUploadPath()
public AdaptiveFileUploadFactory setUploadPath(java.io.File uploadPath)
null
default
system TEMP path will be used.public int getMaxFileSize()
public AdaptiveFileUploadFactory setMaxFileSize(int maxFileSize)
-1
disables this constraint.public boolean isBreakOnError()
public AdaptiveFileUploadFactory setBreakOnError(boolean breakOnError)
public AdaptiveFileUploadFactory breakOnError(boolean breakOnError)
public AdaptiveFileUploadFactory setFileExtensions(java.lang.String[] fileExtensions, boolean allow)
null
will turn this feature off.Copyright © 2003-present Jodd Team