name1090 Posted June 8, 2008 Share Posted June 8, 2008 is there a way to determine the tmp-filename of a file upload while the upload is still in progress? I know that 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. How can we get the tmp filename in advance when the upload is not yet finished? Quote Link to comment Share on other sites More sharing options...
MiCR0 Posted June 8, 2008 Share Posted June 8, 2008 $_FILES['FIXME']['tmp_name'] I think? Quote Link to comment Share on other sites More sharing options...
name1090 Posted June 8, 2008 Author Share Posted June 8, 2008 Using that, we can get that value only after file upload is finished. But i need to know that tmp name in advance while the upload is in progress. so that i can have a progress bar... Anybody know how to? Quote Link to comment Share on other sites More sharing options...
MiCR0 Posted June 8, 2008 Share Posted June 8, 2008 http://www.devpro.it/code/97.html Quote Link to comment Share on other sites More sharing options...
name1090 Posted June 16, 2008 Author Share Posted June 16, 2008 I used an alternate way for this. your link gave an idea. Anyway Thanks. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 16, 2008 Share Posted June 16, 2008 The Alternative PHP Cache (APC) has some methods available for getting information about upload files in progress. Quote Link to comment Share on other sites More sharing options...
name1090 Posted June 16, 2008 Author Share Posted June 16, 2008 Thanks. But the problem in my server there is no APC enabled..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.