You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Joe Germuska (JIRA)" <ji...@apache.org> on 2007/04/02 21:58:51 UTC

[jira] Commented: (STR-487) Multiple file upload not possible due to MultiPartRequestHandler limitation?

    [ https://issues.apache.org/struts/browse/STR-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40732 ] 

Joe Germuska commented on STR-487:
----------------------------------

Patch applied in r524895 on the STRUTS_1_3_BRANCH -- can anyone help me with using SVN to merge that into head?

Fix involved more or less applying Don's patch to CommonsMultipartRequestHandler, but also a change to RequestUtils to deal with the case that an ActionForm is configured to accept multiple files but the client only uploads a single.  This feels kind of hacky but it appears to work.  We were not able to implement Don's patch as provided, and I couldn't authorize enough work time to make all the changes to a test infrastructure to support unit testing this, so alas, no unit test was created for this fix.

This ticket can be closed as soon as the changes to CommonsMultipartRequestHandler and RequestUtils are merged into the Struts 1 trunk -- as noted, I need SVN help with that.

> Multiple file upload not possible due to MultiPartRequestHandler limitation?
> ----------------------------------------------------------------------------
>
>                 Key: STR-487
>                 URL: https://issues.apache.org/struts/browse/STR-487
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Nightly Build
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Marcel
>         Assigned To: Joe Germuska
>            Priority: Minor
>         Attachments: multiple-files.patch
>
>
> File upload of a single file with Struts seems to work OK. But it fails for multiple files. Note: I 
> mean 1 <INPUT TYPE="FILE"> tag where the user selects *multiple* files (Opera and IE allow this), 
> not multiple <INPUT TYPE="FILE"> tags!
> The MultipartRequestHandler doesn't seem to 
> support this, since it getFileElements() returns FormFiles in a hashtable, and cannot 
> therefore handle more than 1 FormFile for each input name. 
> The only way around this is to put 
> multiple INPUT tags on the page, which is a problem when I want to allow the user to upload a lot of 
> (small) files.
> TIA
> Marcel Maré

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.