Hani, Someone posted a while ago to bugzilla for commons fileupload some code related to a progress bar. However it never was really looked at. I checked the bug list [1] and don't see the code. It was submitted to the mailing list a while ago. At any rate, I remember chatting with the developer a couple months ago that it was a shame a progressbar didn't come right out of file upload.
However, as I am a recently minted committer on the Commons project, I have been going back and looking at all the bits of code I have wanted to add/review for the past year etc and get them in. So, if you want to look at the codebase, if you can apply your progressbar then let me know and we can collaborate on getting the code committed. If I can find the code that was submitted, I'll send it your way. Eric Pugh [1] http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSI GNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&em ail2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&change din=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Commons&compone nt=File+Upload&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_de sc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywor ds=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtyp e=doit&order=%27Importance%27) > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Hani Suleiman > Sent: Tuesday, December 23, 2003 3:05 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] File upload progressbar > > > COS has an unpleasant license (I have no interest in buying a > servlets > book), and Jason Hunter has done horrible things to the > servlet spec so > I'm not a big fan. > > I must admit, I didn't think of commons fileupload, I'll investigate > since I think they might already have this functionality. > > On Dec 23, 2003, at 9:02 AM, Frank Febbraro wrote: > > > The Listener sounds like a great idea. > > > > However since the pell code/developer sounds like it does > not accept > > changes > > too easily, has inefficiencies, and would require even more > > maintainence > > just to add new functionality, could something like this be > added to > > COS or > > Apache Commons FileUpload instead? Maybe they would be more > interested > > in > > incorporating this functionality? > > > > Otherwise, thanks, I look forward to this fucntionality. > > > > ----- Original Message ----- > > From: "Hani Suleiman" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, December 21, 2003 1:44 AM > > Subject: [OS-webwork] File upload progressbar > > > > > >> I've been piddling about with the idea of a progress > monitor for file > >> uploads. At least 4 people have asked for it so it might be a > >> worthwhile addition to ww 1.4 (and then ported to 2.0). > >> > >> I have something working now, I'll explain how it works below and > >> would > >> appreciate any feedback as I'd rather people sign off on > it before/if > >> I > >> commit it. > >> > >> The first issue is that it requires changes to the pell multipart > >> library. There's no cvs tree for this so maintaining diffs > would be > >> too > >> annoying, so we have a couple of options: > >> > >> 1) Move the code to the webwork tree, which would have the > advantage > >> of > >> being able to clean up the pell code (it's very, VERY ugly > and quite > >> inefficient in some places), but the disadvantage would be > that it's > >> extra code for us to maintain. > >> > >> 2) Publish a set of diffs against the latest version of pell, so > >> anyone > >> updating pell can apply diffs and check in the resultant binary. > >> Advantages is that we'd stay kinda in sync with pell. Disadvantages > >> would be the hassle of managing the diffs. > >> > >> 3) Get Jason Pell to accept the changes and commit them to > his tree. > >> I've emailed him about the changes I made a year ago, but he didn't > >> seem that interested, might be worth trying again. > >> > >> The actual changes are the addition of a MultipartListener > interface > >> which is passed in to the various constructors, this has 3 methods: > >> > >> void fileStarted(String fileName, long size); > >> void dataRead(String fileName, int amount); > >> void fileCompleted(String fileName); > >> > >> It's fairly clear from the names what each one does. > >> > >> Modifications in webwork: > >> > >> Addition of a ProgessMonitor bean, this would hold the > current 'state' > >> of the upload. Currently I have it implemented with > filename/data left > >> to read/data read/total size. > >> > >> Modification of PellMultiPartRequest to implement > MultipartListener, > >> and pass itself into the pell constructors. Before the pell > >> constructor > >> is called, an instance of the progress meter is created > and put in the > >> http session (it's also a new field in PellMultipartRequest). The > >> implementation of the listener methods simply updates the > appropriate > >> fields in the progress bean. When the pell constructor returns (ie, > >> parsing is done), the progress bean is removed from the session. > >> > >> That's pretty much it on the server end. So during the > upload, there > >> is > >> a progress bean in the session that can be queried on the > client side. > >> > >> The modification I made to the webwork upload example is to add an > >> iframe to the upload page. When the page is loaded, the > iframe is set > >> to be blank, when the form is submitted, the iframe > location is set to > >> a simple jsp page that just reads the properties of the > progress bean > >> and displays them. > >> > >> So...thoughts? > >> > >> Hani > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.net email is sponsored by: IBM Linux Tutorials. > >> Become an expert in LINUX or just sharpen your skills. > Sign up for > >> IBM's > >> Free Linux Tutorials. Learn everything from the bash shell to sys > >> admin. > >> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > >> _______________________________________________ > >> Opensymphony-webwork mailing list > >> [EMAIL PROTECTED] > >> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IBM Linux Tutorials. > > Become an expert in LINUX or just sharpen your skills. Sign up for > > IBM's > > Free Linux Tutorials. Learn everything from the bash shell to sys > > admin. > > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's > Free Linux Tutorials. Learn everything from the bash shell > to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
