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? Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/ Share on other sites More sharing options...
MiCR0 Posted June 8, 2008 Share Posted June 8, 2008 $_FILES['FIXME']['tmp_name'] I think? Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-560285 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? Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-560290 Share on other sites More sharing options...
MiCR0 Posted June 8, 2008 Share Posted June 8, 2008 http://www.devpro.it/code/97.html Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-560291 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. Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-566522 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. Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-566535 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..... Link to comment https://forums.phpfreaks.com/topic/109222-solved-determining-tmp-filename-in-advance-while-the-upload-is-still-in-progress/#findComment-566592 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.