From: Chuck E. <chu...@gm...> - 2006-09-12 20:31:32
|
On 9/12/06, Dan Milstein <da...@co...> wrote: > > Can you tell us what's different between your production and dev > > environment? That would include how the process is launched as well. > > And is there a difference in what modules get imported? > > Let me do some detective work -- I've got a bit of time now, so let > me see what I can find. If I come up blank, I'll pass on everything > I've got. > > > Also, even if you tapped into the cgi module, would you really be able > > to give the user a progress bar? It seems that their window would be > > tied up by the upload task being performed by the browser. > > It works by way of a Javascript function which polls the server every > few seconds and updates the progress bar. The tricky part is getting > some sort of identifier to the Javascript function so that it can > tell the server which upload it's asking about. When I generate the > page, I put in a new unique id which goes both into the URL of the > form action and into the Javascript code. The tapped cgi module then > gets that id from the URL and, as it fills the temp file, updates a > globally-accessible dict with info about the progress. The JS > function hits a servlet which just grabs the progress info from that > dict. That's neat. I should have presumed it was a Javascript technique. Oops. I better say "AJAX" or I might not be employable. :-) -Chuck |