Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI.pm upload file, retrieve temporary name

CGI.pm, CGI upload, perl upload, tempname, temporary name, upload temp name

         

m_digital

2:45 pm on Nov 1, 2007 (gmt 0)

10+ Year Member



I'm using a upload script that uses CGI.pm to upload fields and files. Everything works fine until I need to write-out the uploaded file. For some reason, that I have no control over, a 100 Meg file takes about an hour to copy from the temp folder to the upload folder. So I've decided to see if I can just rename, in effect move, the temp file, in an effort to speed up the upload process. Problem is, I can't for the life of me, figure-out how to retrieve the temp file's name. I've read tons of CPAN docs on the CGI.pm upload, and tried different ways of retrieve the temp name, but with no success.

Does anyone have a solution for retrieving the temp name of a file when using CGI.pm?

It's win32, iis environment.

phranque

10:53 pm on Nov 1, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, m_digital!

what you will find is that http is a protocol that is not well designed for uploading large files.
you will typically hit various problems when you get to the 100M level.
a little larger and you will be timing out or freezing up.
there is another internet protocol well designed for large uploads called ftp.

i believe the problem lies in the fact that the entire (multipart) document must be stored in memory under the server process before the parts can be separated and stored as files.

other than that, i have no answer for your temp file name question.