You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Girish Kumar Balachandran (JIRA)" <de...@myfaces.apache.org> on 2010/03/27 02:30:27 UTC

[jira] Created: (TRINIDAD-1765) File size is now calculated based on byte counting instead of looking @ the multipart header

 File size is now calculated based on byte counting instead of looking @ the multipart header
---------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1765
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1765
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Archetype
    Affects Versions: 1.2.14-core ,  2.0.0.2-core 
            Reporter: Girish Kumar Balachandran


Currently, the UploadedFileProcessorImpl creates UploadedFileImpl object to pass it along the chain. UploadedFileImpl actually reads full stream and buffers the whole file in the memory/file. While it buffers, it also does byte counts.

There is no real need to buffer the whole file content in the memory/file if the only consumer is the final bean (via Valuechanged listener). We could just let the stream bypass buffer and go right on to the end code.Currently we always buffer. The implementaion could be easily changed to pass on the unbuffered FileUploadConfiguratorImpl:TempUploadedFile to the bean, but this implementation does not fully implement dispose() and getLength() fully. These two methods can be implemented with out scanning the whole bytes by just looking at the multipart header information.

Once this implementation is corrected, default UploadedFileProcessor could just return TempUploadedFile that is not backed by a buffer.

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