Re: determine file-upload's tmp-filename

From: Date: Sun, 27 Jan 2008 09:21:19 +0000
Subject: Re: determine file-upload's tmp-filename
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-268165@lists.php.net to get a copy of this message
On Jan 26, 2008, at 357PM, Michael Fischer wrote:
hi there, is there a way to determine the tmp-filename of a file upload while the upload is still in progress?
I'm not sure when it becomes available, but $_FILES['file_name']['tmp_name'] is the only place I know of to find the temporary name.
the tmp-file is stored in /tmp and it's name is something like PHPXXXXXXXX. what i would like to do is: i want to upload a file via a html-form and while the upload is in progress make repeatedly ajax-requests to a php-script on the server that replies the size of the tmp file (the amount of data that was already uploaded). So in this script i need to know what the tmp-filename is.
You could try doing a print_r($_GLOBALS); in that script to find out if there are any other helpful places to check. HTH, Brady

« previous php.general (#268165) next »