* Thomas K. Burkholder ([EMAIL PROTECTED]) [010414 04:28]:
> ...
>
> I'd like to write upload code that shows progress (via a fork and
> refresh header trick - don't worry about that). What I'm wondering is,
> by the time I get $fh above (or even by the time I'm in the handler for
> all I know) do I already have the entire file uploaded, or is it done
> lazily as reads are performed on $fh? I'm not very good at reading this
> XS stuff, but I looked at libapreq and from that I suspect it's all done
> up front. Is there any way to read it incrementally?
>
> Has anyone solved this problem before? I want to provide an upload
> function for my web app that shows the user periodic progress or maybe
> even allows them to cancel it part way through. Is this too much of a
> reach for http/mod_perl?
AFAIK, the server doesn't even start processing the request until the
entire file is uploaded. In the past (when it's absolutely necessary)
I've popped up a tiny Javascript window telling the user to be patient
(or whatever) while the file uploads. The returned page has an
onload() handler which closes the window. It's not a progress bar, but
it's something that hopefully prevents the user from getting
impatient, clicking the browser's 'Stop' button and resubmitting the
request.
Chris
--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.