commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Courcoux <pe...@courcoux.biz>
Subject [FILEUPLOAD] Progress reporting
Date Fri, 27 Jun 2003 10:35:34 GMT
Martin,

Congratulations and thanks for the hard work getting the 1.0 release
out. 

As discussed some while ago, I have patches to fileupload which enable
support for file upload progress reporting. These are attached below.

I have changed the implementation since first proposing this on the list
and believe that these are backwards compatible. 

Issues for consideration:-

We report only the names of files extracted from fileitems as they are
parsed and ignore other field names.

MultipartStream updates the reporter object every time its internal
buffer is filled from the request InputStream. This internal buffer
defaults to 4k in size and the reporter is therefore updated in 4k
chunks. This is configurable only by specifying the buffer size. This
seems to be a reasonable compromise between fine grain updating and
performance. It is also why I have chosen not to report fields as they
are read as I guess that the updating is not frequent enough to allow
any meaningful information in most cases.

The default implementation of reporting is minimal, but can be extended
to provide percentage done and graphical progress reporting etc.

I hope I have put the right licence in the files. Please note that as
the changes are to add functionality, I have added myself as an author
to the files I have changed. I do not know what the protocol for this
is. Feel free to remove this if not correct.

I have tried to put some usage notes in the javadocs. However, I am
currently using this implementation with Turbine and will submit the
required changes to turbine-dev, including a detailed howto with example
code.

Regards,

Peter
-- 
Peter Courcoux <peter@courcoux.biz>

Mime
View raw message