[Zope] RE: Re: Tracking upload of files to Zope

Gitte Wange gitte at mmmanager.org
Wed Oct 1 05:20:15 EDT 2003


On Tue, 30 Sep 2003 13:48:26 +0000, Passin, Tom wrote:

> [ Gitte Wange]
> 
>> Browsers?
>> No ... they just load the new page - that's what make the 
>> users think the
>> website has fallen into sleep and they start clicking all 
>> sorts of things.
>> 
>> > For every other approach, there is simply no channel in the
>> > HTTP-protocol to output the information to.
>> > 
>> > So the question about how to get the information is completely
>> > secondary :-)
>> 
>> Hmmm .. so Zope doesn't know how much data it has received ?
>> 
>> > IF you want to watch uploads for debugging purpose, and files
>> > are huge, you can try "lsof" in the temp directory.
> 
> I can imagine one way to do this, if you can get the number of bytes
> uploaded so far.  It would be a bit cumbersome, though.  Here goes  -
> 
> The command to start the upload opens a new window.  That window has a
> meta element that causes the page to reload, say every five seconds.
> The page for the automatic reload displays the bytes uplaoded so far.
> When the upload is complete, the next reload has the window close itself
> (using javascript), or else it just announces that the upload is
> complete.
> 
> Personally, I doubt that it is worth it.  It is easier to load a static
> page that just says "upload in progress..." or something like that.
> 
> Cheers,
> 
> Tom P

Okay - I can see that just dislaying an 'upload in progress' would be the
best way to do this.
So I follow this path :-)

Which leaves me with one last question:
PageA contains the <form> that has a <input type="file"> element.
PageB contains a text saying 'Upload in progress ...'
When that form is submitted, the page won't return until the entire file
is uploaded (and then the wait text won't get displayed).
So what I need to do is to make some sort of hidden frame that submits the
form ?

How would you do this ? (sorry - it's not obvious for me)

-- 
Gitte Wange
Technical Manager

Email: gitte at mmmanager.org
Web: http://www.mmmanager.org
Tlf: +45 36 46 20 02

After 1.5 years of Python, I'm still discovering 
richness (and still unable to understand what the 
hell Jim Fulton is talking about).

    -- Gordon McMillan, 13 Mar 1998





More information about the Zope mailing list