[ 
https://issues.apache.org/jira/browse/WICKET-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serban Balamaci updated WICKET-5074:
------------------------------------

    Description: 
Right now MockHttpServletRequest keeps a Map<String, UploadedFile> 
uploadedFiles to simulate the uploads, but that only covers multiple 
FileUploadFields in the Page(each holding a single upload file).
When doing MockHttpServletRequest.addFile(...), it does not add the file to a 
list, but rather replaces the last one:
uploadedFiles.put(fieldName, uf);
 
However with the HTML5 type of input type multiple="multiple", 
FileUploadField.getFileUploads() returns list of uploaded files, so I guess 
that MockHttpServletRequest should honor this and keep the files into 
Map<String, List<UploadedFile>>.

  was:
Right now MockHttpServletRequest keeps a Map<String, UploadedFile> 
uploadedFiles to simulate the uploads, but that only covers multiple 
FileUploadFields in the Page(each holding a single upload file).
When doing MockHttpServletRequest.addFile(...), it does not append the file to 
a list, but rather replaces the last one:
uploadedFiles.put(fieldName, uf);
 
However with the HTML5 type of input type multiple="multiple", 
FileUploadField.getFileUploads() returns list of uploaded files, so I guess 
that MockHttpServletRequest should honor this and keep the files into 
Map<String, List<UploadedFile>>.

    
> Improvement for MockHttpServletRequest and FormTester to support 'multiple' 
> input type of fileUpload
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5074
>                 URL: https://issues.apache.org/jira/browse/WICKET-5074
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.6.0
>            Reporter: Serban Balamaci
>            Priority: Minor
>
> Right now MockHttpServletRequest keeps a Map<String, UploadedFile> 
> uploadedFiles to simulate the uploads, but that only covers multiple 
> FileUploadFields in the Page(each holding a single upload file).
> When doing MockHttpServletRequest.addFile(...), it does not add the file to a 
> list, but rather replaces the last one:
> uploadedFiles.put(fieldName, uf);
>  
> However with the HTML5 type of input type multiple="multiple", 
> FileUploadField.getFileUploads() returns list of uploaded files, so I guess 
> that MockHttpServletRequest should honor this and keep the files into 
> Map<String, List<UploadedFile>>.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to