public abstract class AbstractFileUploadInterceptor extends AbstractInterceptor
ConditionalInterceptor.LegacyAdapter| Modifier and Type | Field and Description | 
|---|---|
| static String | STRUTS_MESSAGES_BYPASS_REQUEST_KEY | 
| static String | STRUTS_MESSAGES_ERROR_CONTENT_TYPE_NOT_ALLOWED_KEY | 
| static String | STRUTS_MESSAGES_ERROR_FILE_EXTENSION_NOT_ALLOWED_KEY | 
| static String | STRUTS_MESSAGES_ERROR_FILE_TOO_LARGE_KEY | 
| static String | STRUTS_MESSAGES_ERROR_UPLOADING_KEY | 
| static String | STRUTS_MESSAGES_INVALID_CONTENT_TYPE_KEY | 
| static String | STRUTS_MESSAGES_INVALID_FILE_KEY | 
| Constructor and Description | 
|---|
| AbstractFileUploadInterceptor() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | acceptFile(Object action,
          UploadedFile file,
          String originalFilename,
          String contentType,
          String inputName)Override for added functionality. | 
| protected void | applyValidation(Object action,
               MultiPartRequestWrapper multiWrapper) | 
| protected String | getTextMessage(Object action,
              String messageKey,
              String[] args) | 
| protected String | getTextMessage(String messageKey,
              String[] args) | 
| protected TextProvider | getTextProvider(Object action) | 
| protected boolean | isNonEmpty(Object[] objArray) | 
| void | setAllowedExtensions(String allowedExtensions)Sets the allowed extensions | 
| void | setAllowedTypes(String allowedTypes)Sets the allowed mimetypes | 
| void | setContainer(Container container) | 
| void | setMatcher(ContentTypeMatcher<Object> matcher) | 
| void | setMaximumSize(Long maximumSize)Sets the maximum size of an uploaded file | 
intercept, intercept, shouldIntercept, shouldInterceptdestroy, init, setDisabledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptadaptdestroy, initpublic static final String STRUTS_MESSAGES_BYPASS_REQUEST_KEY
public static final String STRUTS_MESSAGES_ERROR_UPLOADING_KEY
public static final String STRUTS_MESSAGES_ERROR_FILE_TOO_LARGE_KEY
public static final String STRUTS_MESSAGES_INVALID_FILE_KEY
public static final String STRUTS_MESSAGES_INVALID_CONTENT_TYPE_KEY
public static final String STRUTS_MESSAGES_ERROR_CONTENT_TYPE_NOT_ALLOWED_KEY
public static final String STRUTS_MESSAGES_ERROR_FILE_EXTENSION_NOT_ALLOWED_KEY
public void setMatcher(ContentTypeMatcher<Object> matcher)
public void setContainer(Container container)
public void setAllowedExtensions(String allowedExtensions)
allowedExtensions - A comma-delimited list of extensionspublic void setAllowedTypes(String allowedTypes)
allowedTypes - A comma-delimited list of typespublic void setMaximumSize(Long maximumSize)
maximumSize - The maximum size in bytesprotected boolean acceptFile(Object action, UploadedFile file, String originalFilename, String contentType, String inputName)
action - - uploading action for message retrieval.file - - proposed upload file.originalFilename - - name of the file.contentType - - contentType of the file.inputName - - inputName of the file.protected boolean isNonEmpty(Object[] objArray)
protected TextProvider getTextProvider(Object action)
protected void applyValidation(Object action, MultiPartRequestWrapper multiWrapper)
Copyright © 2000–2025 Apache Software Foundation. All rights reserved.