Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bar 1

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I am trying to make sense of CGI::progressBar and tk::progressBar.
I have found a few partial examples but the explanations just go right over my head.
I require a progress bar in an existing file upload routine, what are my best options?
Do the tk modules work with a standard installation of Perl?

Keith
 
Hi Keith,

As we concluded something somewhere was processing the file before it was being given to your script.

Why have they configured the server in this fashion? Yes, memory is used to cache the file, but I though it was read and written in chunks, surely you cannot afford to read a 500MB file from multiple users all into memory in its entirety before writing any of it to disk?

As you have found, you cannot utilise the chunks read/write hook of CGI if the entire file is uploaded before your script even gets a sniff at it.

I guess an animation on submit of the upload is a compromise.






"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
The animation is a compromise but I would prefer a real time progress bar.

I tried the same scenario on another server and got he same results.
I am wondering if this is actually the default behaviour of shared servers but if it is, uploading large files could crash the server.

Keith
 
That's what I was thinking, you don't want any one user on a web-server sucking up large chunks of memory.

Though I still don't get why the upload is taking so long, even if it is caching the file first, 30+ seconds seems a long time for an 8MB file.

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
I thought that one of the experts would have put an end to our amateur speculation by now but unfortunately not.
While the animation does the job, I did have in mind a rather fancy and unusual progress graphic but if the basic chunk reporting doesn't work it would look a bit silly.
I have posted the question in HTML as it seems to be more of a HTML issue than a Perl one.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top