[
https://issues.apache.org/jira/browse/TRINIDAD-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Scott O'Bryan resolved TRINIDAD-2156.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.2-core
> Enhancements to the upload framework to support multiple files
> --------------------------------------------------------------
>
> Key: TRINIDAD-2156
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2156
> Project: MyFaces Trinidad
> Issue Type: Improvement
> Components: Components
> Affects Versions: 2.0.2-core
> Environment: linux x86
> Reporter: Kentaro Kinebuchi
> Assignee: Scott O'Bryan
> Fix For: 2.0.2-core
>
> Attachments: ER10348530-trinidad.patch
>
>
> The attached patch file contains several enhancements to the upload framework:
> 1. Support the ability to configure the maximum file size which can be
> uploaded. There is currently a parameter
> org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE which controls how large
> the request can be. However, a request can potentially include multiple files
> so this parameter is insufficient. Add a new parameter called
> org.apache.myfaces.trinidad.UPLOAD_MAX_FILE_SIZE.
> 2. Enhance UploadedFiles to be able to support multiple files. Currently,
> FileUploadConfiguratorImpl already supports parsing multiple files in a
> single request but UploadedFiles does not contain the necessary APIs to grab
> those files. Add the new methods:
> public List<UploadedFile> getUploadedFileList(String name)
> public Map<String, List<UploadedFile>> getUploadedFileMap()
> 3. Add the ability to upload multiple files across requests. The upload
> framework currently disposes of all the uploaded files in a request once the
> request completes. This means that it is unable to support the behavior of
> some of the newer upload frameworks which upload files across several
> requests which enables monitoring of individual file upload progress, retry,
> cancel, etc. Enable this ability by being able to specially denote multiple
> file uploades across several requests and save those in the Session so they
> persist across requests. Add the new APIs below to UploadedFiles:
> static public UploadedFiles getSessionUploadedFiles(FacesContext context)
> public static void retrieveSessionUploadedFiles(ExternalContext context,
> String name)
> getSessionUploadedFiles() simply returns all the files currently in the
> Session. retrieveSessionUploadedFiles() will retrieve and remove all the
> files in the Session and is meant to be called once we have uploaded all the
> files and are ready to make them available to Faces lifecycle.
> 4. Update FileUploadConfiguratorImpl to support the additional processing of
> multiple files uploaded across requests. Those files will have a parameter
> called "org.apache.myfaces.trinidad.UploadedFiles" which will have the value
> of "multipleAdd" or "multipleDelete" depending on whether we want to add
> files to the session or delete them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira