[Zope] Tracking upload of files to Zope

J. Cameron Cooper jccooper at jcameroncooper.com
Mon Sep 29 22:05:29 EDT 2003


>I have one huge problem with Zope: It's impossible to track how far an
>upload of a file to Zope is :-((
>
>It seems like Zope "blocks" untill a file is uploaded to Zope making it
>impossible to tell how many bytes has been transfered or similar.
>
>Is it me that hasn't got a clue on how the HTTP protocol works or is it a
>"bad implementation" of file uploads in Zope ?
>
>I kinda hoped I could create some sort of "wait page" when users upload
>files to my website ... it's big files (video files) so it takes some time
>and therefor it would be really great to be able to display a wait page to
>people.
>  
>
HTTP doesn't preclude you from knowing how many bytes you've sent, but 
it does make it rather difficult for a server to do anything about it. 
It's really a client-side thing to provide a "status bar" or such on 
data transfer, because (1) it's stateful dynamic data and (2) the 
server's already occupied during that current transaction.

The only scenario I can imagine goes like this:

 - user asks to upload, gets a unique key or id
 - opens two clients/browser windows, one to a status page, one to an 
upload page, both by key
 - user starts upload and then looks at the status page
 - upload page shows some sort of status that Zope has hooked into the 
file transfer upstream

It's really quite complicated and cumbersome. (You may be able to do 
funny things with Javscript or write a special client to make this more 
transparent, but it's still a hack.) You're better off getting the 
browser/client to deal with it. Most FTP clients do this as a matter of 
course.

             --jcc

-- 
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."





More information about the Zope mailing list