Hello everyone,

 

I am currently trying to develop a http file upload application with
progress indication.

Until now, I used the following rough algorithm:

 

- save CONTENT_LENGTH to a temp file

- write STDIN to another temp file while it is being transferred

- with these two files, an other script can calculate and output the
progress in a different frame while the upload is still running

- when STDIN is completely written to the temp file, the STDIN handle is
closed, and re-opened to read from the temp file.

- call $cgi_object->upload($field) to get a handle for the actually uploaded
file, and finally save it to a permanent file.

 

This one works great in a mod_perl and CGI.pm 3.04 environment.

 

The problems start when running mod_perl2 and CGI > 3.10.

Somehow, the more recent CGI now recognizes messing around with STDIN.
Methods like upload(), tmpFileName() or even param() return undef after
STDIN has been touched. 

Other way round, after initializing a CGI object with $cgi_object = new CGI;
without doing anything, STDIN seems to be empty.

 

Is there any way to configure an Apache 2.0 / mod_perl2 server in order to
avoid this behaviour?

Can anyone imagine an other approach to a workaround?

 

Thank you very much in advance.

 

[str]

Reply via email to