[ 
http://issues.apache.org/jira/browse/MYFACES-668?page=comments#action_12359425 
] 

Martin Marinschek commented on MYFACES-668:
-------------------------------------------

In the current SVN head, at least the second part of this issue has been fixed. 
Don't know about the first one, though.

Anyone more knowledgable about fileUpload care to comment?

regards,

Martin

> MyFaces FileUpload Issues
> -------------------------
>
>          Key: MYFACES-668
>          URL: http://issues.apache.org/jira/browse/MYFACES-668
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.0
>     Reporter: David F

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to