if (action instanceof ValidationAware) {
validation = (ValidationAware) action;
}
GaeMultiPartRequestWrapper multiWrapper = (GaeMultiPartRequestWrapper) request;
if (multiWrapper.hasErrors()) {
for (String error : multiWrapper.getErrors()) {
if (validation != null) {
validation.addActionError(error);
}
LOG.error(error);
}
}
// bind allowed Files
Enumeration<String> fileParameterNames = multiWrapper
.getFileParameterNames();
while (fileParameterNames != null
&& fileParameterNames.hasMoreElements()) {
// get the value of this input tag
String inputName = fileParameterNames.nextElement();
// get the content type
String[] contentType = multiWrapper.getContentTypes(inputName);
if (isNonEmpty(contentType)) {
// get the name of the file from the input tag
String[] fileName = multiWrapper.getFileNames(inputName);
if (isNonEmpty(fileName)) {
String[] fileItemStreams = multiWrapper
.getFileContents(inputName);
// get a File object for the uploaded File
if (fileItemStreams != null && fileItemStreams.length > 0) {
List<String> acceptedFiles = new ArrayList<String>(
fileItemStreams.length);