myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kentaro Kinebuchi (Created) (JIRA)" <>
Subject [jira] [Created] (TRINIDAD-2156) Enhancements to the upload framework to support multiple files
Date Thu, 03 Nov 2011 22:31:34 GMT
Enhancements to the upload framework to support multiple files

                 Key: TRINIDAD-2156
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Components
    Affects Versions: 2.0.2-core
         Environment: linux x86
            Reporter: Kentaro Kinebuchi
         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:!default.jspa
For more information on JIRA, see:


View raw message