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

Martin Marinschek resolved TOMAHAWK-6.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.7-SNAPSHOT
         Assignee: Martin Marinschek

Both issues fixed in latest head.

Thanks to Alexander Jesse for helping me to fix and test this.

regards,

Martin

> MyFaces FileUpload Issues
> -------------------------
>
>                 Key: TOMAHAWK-6
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-6
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: File Upload
>            Reporter: David F
>            Assignee: Martin Marinschek
>             Fix For: 1.1.7-SNAPSHOT
>
>
> Their are two issues:
>  The first issues is MyFaces defines an UploadFile Interface that you access 
> in
> your backing bean. The UploadedFile interface doesn't define a method for 
> deleting the temporary files that Commons File Upload creates on disk. These 
> files will be deleted only when the FileItem instances are garbage collected. 
> The DefaultFileItem class of Commons File Upload has a finalize() method that 
> deletes the temporary file managed by the object that is removed from memory. 
> If the application is uploading large files, we want to delete them right 
> after they are processed, without waiting for garbage collection. To be able 
> to do that, we would have to add a getFileItem() method (in 
> UploadedFileDefaultFileImpl) that should return the FileItem instance, which 
> has a delete() method. In addition, we would also have to add
> this to the UploadFile interface as well.
> The second issue is Their are two filter parameters in Myfaces file upload 
> component:  uploadThresholdSize and uploadMaxFileSize(both are required by 
> the Commons File Upload component) The uploadThresholdSize tells Common File 
> uploads to keep files in memory that are less than this size, and 
> uploadMaxFileSize says to ignore files that take less than this size.If you 
> try to upload a file that is too large, the current version of MyFaces 
> ignores all form data, as if the user submitted an empty form. If  we want to 
> signal the failed upload to the user, we would have to change the source code 
> of the MultipartRequestWrapper class of MyFaces and add a 
> FacesContext.getCurrentInstance().addMessage() to warn the user.

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

Reply via email to