|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileUploadFilter
An interface to filters processing multipart/form-data requests that contain file(s) to be uploaded. The multipart/form-data Internet type is specified in RFC2388.
Additional information about Multipurpose Internet Mail Extensions (MIME) is provided in RFC's 2046-2049. Content-disposition headers are described in RFC2183.
Filter is secured, and the request needs to have write permission to each file name to be uploaded.
In order to upload files, a form with at least one input field of type 'file' is required. Set the form 'enctype' attribute to "multipart/form-data", and in the form action, set the upload key to correspond to the desired upload filter. The upload key value is either the field name of the form field containing the file name or an empty string if the filename in the content-disposition header is to be used as a basis for the filename.
About encoding.
| Method Summary | |
|---|---|
File |
getUploadedFile(String file)
Gets the full path of the uploaded file. |
int |
getUploadFileLimit()
Gets the limit for the number of upload files. |
String |
getUploadFolderPath()
Gets the folder path into which to upload the files. |
String |
getUploadKey()
Gets the key of the folder into which to upload the files. |
int |
getUploadPathLimit()
Gets the limit for the lenght of the upload path. |
int |
getUploadSizeLimit()
Gets the limit for the size of the upload content. |
boolean |
isOverwriteEnabled()
Gets the flag that indicates whether a file with the same name may overwrite an existing file in the upload folder. |
void |
setOverwriteEnabled(boolean flag)
Sets the flag that indicates whether a file with the same name may overwrite an existing file in the upload folder. |
void |
setUploadFileLimit(int limit)
Sets the limit for the number of upload files. |
void |
setUploadFolderPath(String folder)
Sets the folder path into which to upload the files. |
void |
setUploadKey(String key)
Sets the key of the folder into which to upload the files. |
void |
setUploadPathLimit(int limit)
Sets a limit for the lenght of the upload path. |
void |
setUploadSizeLimit(int limit)
Sets the limit for the size of the upload content. |
| Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter |
|---|
checkPermission, checkPermission, checkPermission |
| Methods inherited from interface org.norther.tammi.core.security.AccessController |
|---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, doFilter, init |
| Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter |
|---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, doFilter, init |
| Method Detail |
|---|
String getUploadKey()
void setUploadKey(String key)
key - the upload key.String getUploadFolderPath()
void setUploadFolderPath(String folder)
folder - the folder either as an absolute path or relative to the
key folder.boolean isOverwriteEnabled()
void setOverwriteEnabled(boolean flag)
flag - the flag, give true if files may be overwritten, otherwise
false.int getUploadSizeLimit()
void setUploadSizeLimit(int limit)
limit - the limit for the upload size in bytes, or -1 if unlimited.int getUploadPathLimit()
void setUploadPathLimit(int limit)
limit - the limit for the upload path in chars, or -1 if unlimited.int getUploadFileLimit()
void setUploadFileLimit(int limit)
limit - the limit for the upload files, or -1 if unlimited.File getUploadedFile(String file)
file - the uploaded file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||