Class AdaptiveFileUploadFactory
java.lang.Object
jodd.http.upload.impl.AdaptiveFileUploadFactory
- All Implemented Interfaces:
FileUploadFactory
Factory for
AdaptiveFileUpload.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbreakOnError(boolean breakOnError) Specifies if upload should break on error.Creates new instance ofuploaded file.intintbooleansetBreakOnError(boolean breakOnError) setFileExtensions(String[] fileExtensions, boolean allow) Allow or disallow set of file extensions.setMaxFileSize(int maxFileSize) Sets maximum file upload size.setMemoryThreshold(int memoryThreshold) Specifies per file memory limit for keeping uploaded files in the memory.setUploadPath(File uploadPath) Specifies the upload path.
-
Field Details
-
memoryThreshold
protected int memoryThreshold -
uploadPath
-
maxFileSize
protected int maxFileSize -
breakOnError
protected boolean breakOnError -
fileExtensions
-
allowFileExtensions
protected boolean allowFileExtensions
-
-
Constructor Details
-
AdaptiveFileUploadFactory
public AdaptiveFileUploadFactory()
-
-
Method Details
-
create
Creates new instance ofuploaded file.- Specified by:
createin interfaceFileUploadFactory
-
getMemoryThreshold
public int getMemoryThreshold() -
setMemoryThreshold
Specifies per file memory limit for keeping uploaded files in the memory. -
getUploadPath
-
setUploadPath
Specifies the upload path. If set tonulldefault system TEMP path will be used. -
getMaxFileSize
public int getMaxFileSize() -
setMaxFileSize
Sets maximum file upload size. Setting to-1disables this constraint. -
isBreakOnError
public boolean isBreakOnError() -
setBreakOnError
-
breakOnError
Specifies if upload should break on error. -
setFileExtensions
Allow or disallow set of file extensions. Only one rule can be active at time, which means user can only specify extensions that are either allowed or disallowed. Setting this value tonullwill turn this feature off.
-