Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: (crazyinsomniac) Re: Re: (crazyinsomniac) Re: File upload progress?

by chipmunk (Parson)
on Feb 09, 2001 at 21:17 UTC ( #57415=note: print w/replies, xml ) Need Help??

in reply to (crazyinsomniac) Re: (2) (crazyinsomniac) Re: File upload progress?
in thread File upload progress?

I think that what batmonk is asking for may be possible. (Note that batmonk never asked about resuming file uploads over HTTP; merely about an upload progress report.)

With a non-parsed-header (nph) CGI script, one can send output directly to the client while the script is still running. (As opposed to a normal CGI script, where the server waits until the script closes its STDOUT before sending the output to the client).

Thus, a file upload script with a simple progress report could be implemented by alternately reading a chunk of the uploaded file and printing out a status message. The browser would display all the messages that had been sent.

This assumes, however, that the server doesn't read in the whole request itself and then buffer it for the script. That's the part I'm not sure about.

  • Comment on Re: (crazyinsomniac) Re: Re: (crazyinsomniac) Re: File upload progress?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://57415]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2018-06-18 20:10 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (110 votes). Check out past polls.