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!

Creating FTP Progress Bar. 3

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
right, please correct me if i'm wrong..

When a form upload calls the script in the 'action' attribute on submit.

I've read that the file is actually transfered via HTTP before the script then runs.

Is this correct.

If so where is the data stored on the server before it is available through STDIN ?

I'm trying to give the surfer a progress bar for their file upload, and i'm strugling to understand how you could do this, if 1stly you can't tell the size of the file before the transfer starts and if the script isn't run until after upload, well then it's too late for a progress bar.

Can anyone shed some light on this please.

Cheers
1DMF



"In complete darkness we are all the same, only our knowledge and wisdom 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!
 
I would've figured that the filehandle given by CGI.pm comes with a length, which CGI got from the HTTP headers...

Thats a bit of a wish. Its up to each browser/OS what it sends. The CGI documentation discusses that:

When a file is uploaded the browser usually sends along some information along with it in the format of headers. The information usually includes the MIME content type. Future browsers may send other information as well (such as modification date and size). To retrieve this information, call uploadInfo(). It returns a reference to an associative array containing all the document headers.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Well i've certainly got you guys rubbing your hands and scratching your heads - [lol]

Just let me know when you you need another challenge ;-)


"In complete darkness we are all the same, only our knowledge and wisdom 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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top