Mantis - Resin
Viewing Issue Advanced Details
2578 major always 04-08-08 00:54 04-28-08 10:07
waiwong  
ferg  
normal  
closed 3.1.5  
fixed  
none    
none 3.1.6  
0002578: multipart/form-data error for multiple upload files
In the form, the following piece of code is used:

<form action='test.jsp' enctype='multipart/form-data' method='post'>

<input type='File' name='abc' size='50'>

<input type='File' name='abc' size='50'>

<input type='File' name='abc' size='50'>

<input type='submit' value='submit'>
</form>

In the handler test.jsp, the following piece of code is used:

<%
    String []tmpFilePath = request.getParameterValues("abc");
    String []fName = request.getParameterValues("abc.filename");// specific to resin
    out.println("
tmpFilePath.length is " + tmpFilePath.length);
    out.println("
tmpFilePath is " + tmpFilePath[0]);
    out.println("
fName.length is " + fName.length);
    out.println("
fName is " + fName[0]);
%>

The output when using 3.1.3 and 3.1.5, no matter how many files are uploaded, is somthing like:

tmpFilePath.length is 1
tmpFilePath is /....../WEB-INF/work/form/form781049843.tmp
fName.length is 1
fName is

This is wrong.

In 3.0.22, the output is:

tmpFilePath.length is 3
tmpFilePath is /....../WEB-INF/work/form/form744259715.tmp
fName.length is 3
fName is D:\Desktop\tmp pic\TFR10CE.gif

This is correct.
Wrong in 3.1.x, correct in 3.0.22

Notes
(0003018)
ferg   
04-28-08 10:07   
server/136v