Author: mrdon
Date: Thu Oct 12 15:33:44 2006
New Revision: 463476
URL: http://svn.apache.org/viewvc?view=rev&rev=463476
Log:
Fix FileUploadInterceptor handling of multiple files
WW-1470
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?view=diff&rev=463476&r1=463475&r2=463476
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
Thu Oct 12 15:33:44 2006
@@ -247,7 +247,7 @@
for (int index = 0; index < files.length; index++) {
getTextMessage("struts.messages.current.file", new
Object[]{inputName, contentType[index], fileName[index], files[index]},
ActionContext.getContext().getLocale());
- if (acceptFile(files[0], contentType[0],
inputName, validation, ac.getLocale())) {
+ if (acceptFile(files[index], contentType[index],
inputName, validation, ac.getLocale())) {
parameters.put(inputName, files);
parameters.put(inputName + "ContentType",
contentType);
parameters.put(inputName + "FileName",
fileName);