RE: [PHP] determine file-upload's tmp-filename
Your first line of PHP code does not execute until PHP finishes accepting the whole file... On Mon, January 28, 2008 2:34 pm, Mr Webber wrote: This is the info available to upload scripts I have not done this, but am inspired to do it now. My design is to develop my own meter by compare $FILES;'size'] to the actual size on disk as the file uploads; I would use some sort of JavaScript / Ajax service connection so that the upload meter is displayed in the current browsing window or an upload popup. $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] -Original Message- From: Michael Fischer [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 2:50 PM To: php-general Subject: Re: [PHP] determine file-upload's tmp-filename On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] determine file-upload's tmp-filename
This is the info available to upload scripts I have not done this, but am inspired to do it now. My design is to develop my own meter by compare $FILES;'size'] to the actual size on disk as the file uploads; I would use some sort of JavaScript / Ajax service connection so that the upload meter is displayed in the current browsing window or an upload popup. $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] -Original Message- From: Michael Fischer [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 2:50 PM To: php-general Subject: Re: [PHP] determine file-upload's tmp-filename On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
On Jan 28, 2008 2:50 PM, Michael Fischer [EMAIL PROTECTED] wrote: well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. its a shame javascript cant hook into the local filesystem, but i think its just a matter of time until we get there. http://labs.mozilla.com/2007/10/prism/ anyway im pretty sure you can get this effect w/ a flash plugin, that is a progress meter that doesnt have to poll the webserver for status info, if thats what ur after.. -nathan
RE: [PHP] determine file-upload's tmp-filename
The name of the upload tmp file MUST be known. If the $_FILES[] is not available until the upload completes; perhaps a kludge is to set a unique upload_tmp_dir, for the session, that will only contain the upload for this user in this session. There will only be one file to monitor with filesize(). * Now the server can know the destination filename. The form will have to have an OnClick method that passes the srcfilesize to the php service who stores it in a session variable. The existence of the session variable enables the connection to the service and the discovery of the location of the special upload directory The service will just service requests for the filesize. That's half the problem solved. The other half is to make the srcfilesize available to the client JavaScript. -Original Message- From: Michael Fischer [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 3:51 PM To: 'php-general' Subject: RE: [PHP] determine file-upload's tmp-filename On Mon, 2008-01-28 at 15:34 -0500, Mr Webber wrote: On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. I have not done this, but am inspired to do it now. My design is to develop my own meter by compare $FILES;'size'] to the actual size on disk as the file uploads; I would use some sort of JavaScript / Ajax service connection so that the upload meter is displayed in the current browsing window or an upload popup. $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] two problems: - the $_FILES array becomes available when the file-upload is complete. that's too late. - how do you determine the actual size on the disk of the uploaded file, while the upload is in progress? lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
On Mon, 2008-01-28 at 15:26 -0500, Nathan Nobbe wrote: On Jan 28, 2008 2:50 PM, Michael Fischer [EMAIL PROTECTED] wrote: well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. its a shame javascript cant hook into the local filesystem, but i think its just a matter of time until we get there. http://labs.mozilla.com/2007/10/prism/ anyway im pretty sure you can get this effect w/ a flash plugin, that is a progress meter that doesnt have to poll the webserver for status info, if thats what ur after.. -nathan hm, i think that access to the local filesystem in javascript would be a serious security issue. it would be enough if the browser knew how much data it has already sent. i know all the solutions in flash and java - they require the user to have some kind of browser-plugin installed. it's not so much that i need this desperately for a project - i just tried to do an upload-meter out of interest and hit that problem. lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
Michael Fischer wrote: On Mon, 2008-01-28 at 15:34 -0500, Mr Webber wrote: On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. I have not done this, but am inspired to do it now. My design is to develop my own meter by compare $FILES;'size'] to the actual size on disk as the file uploads; I would use some sort of JavaScript / Ajax service connection so that the upload meter is displayed in the current browsing window or an upload popup. $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] two problems: - the $_FILES array becomes available when the file-upload is complete. that's too late. exactly right! - how do you determine the actual size on the disk of the uploaded file, while the upload is in progress? he is probably talking about the amount of data that has been uploaded so far. The size of the tmp file would reflect that amount. lg, Michi I would create your own perl/cgi up-loader that runs like the perl version. I would run it from (x)inetd, or something similar. I have created a number of socket servers that run 24/7 on my server with no glitches. Because of the size of data and the connection duration, I would suggest forking the parent for every child connection that comes in. But then have that child process report what it needs to a database, or temp data file. The incoming TCP connection will report the payload size and from that you can then figure the rest out. You would have to handle all the data connections, creating the tmp_file and such, but it would all be possible. I have been thinking about doing this myself and soon. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] determine file-upload's tmp-filename
On Mon, 2008-01-28 at 15:34 -0500, Mr Webber wrote: On Mon, 2008-01-28 at 12:17 -0600, Richard Lynch wrote: On Sat, January 26, 2008 5:57 pm, 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? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? Google for PHP upload meter instead. That's probably how it works, more or less... I still think it's STOOPID to round-trip back and forth to the server to get an upload progress meter -- The browser developers should be providing you with some kind of progress notification system locally! well, i agree with you - the browser should provide some sort of functionality to find out the amount of data already sent. but i don't know any browser that does. all the php upload meters that i found on google either require to patch php or use perl. I have not done this, but am inspired to do it now. My design is to develop my own meter by compare $FILES;'size'] to the actual size on disk as the file uploads; I would use some sort of JavaScript / Ajax service connection so that the upload meter is displayed in the current browsing window or an upload popup. $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] two problems: - the $_FILES array becomes available when the file-upload is complete. that's too late. - how do you determine the actual size on the disk of the uploaded file, while the upload is in progress? lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
Original-Nachricht Datum: Sat, 26 Jan 2008 16:09:58 -0800 Von: Casey [EMAIL PROTECTED] An: Michael Fischer [EMAIL PROTECTED] CC: php-general@lists.php.net Betreff: Re: [PHP] determine file-upload\'s tmp-filename On Jan 26, 2008 3:57 PM, Michael Fischer [EMAIL PROTECTED] wrote: hi there, is there a way to determine the tmp-filename of a file upload while the upload is still in progress? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? lg, Michi Will this help? http://tomas.epineer.se/archives/3 -- -Casey well, i've found this before and this script uses perl-cgi and not php. it determines the tmp-filename as such: $post_data_file = $tmp_dir/$sessionid._postdata; $monitor_file = $tmp_dir/$sessionid._flength; $error_file = $tmp_dir/$sessionid._err; $signal_file = $tmp_dir/$sessionid._signal; $qstring_file = $tmp_dir/$sessionid._qstring; i'm looking for something similar in php... lg, michi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
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 PHP. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
Original-Nachricht Datum: Sun, 27 Jan 2008 01:21:19 -0800 Von: Brady Mitchell [EMAIL PROTECTED] An: Michael Fischer [EMAIL PROTECTED] CC: php-general@lists.php.net Betreff: Re: [PHP] determine file-upload\'s tmp-filename 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 PHP. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php hm, there's nothing to spectacular in $_GLOBALS: Array ( [GLOBALS] = Array *RECURSION* [_ENV] = Array ( [TERM] = xterm [SHELL] = /bin/bash [DEFAULTLEVEL] = default [LC_ALL] = [EMAIL PROTECTED] [USER] = root [PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4 [PWD] = /etc/apache2/modules.d [LANG] = [EMAIL PROTECTED] [BOOTLEVEL] = boot [SVCNAME] = apache2 [CONSOLETYPE] = pty [SHLVL] = 1 [HOME] = /home/albert [SOFTLEVEL] = default [_] = /usr/sbin/apache2 ) [HTTP_ENV_VARS] = Array ( [TERM] = xterm [SHELL] = /bin/bash [DEFAULTLEVEL] = default [LC_ALL] = [EMAIL PROTECTED] [USER] = root [PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4 [PWD] = /etc/apache2/modules.d [LANG] = [EMAIL PROTECTED] [BOOTLEVEL] = boot [SVCNAME] = apache2 [CONSOLETYPE] = pty [SHLVL] = 1 [HOME] = /home/albert [SOFTLEVEL] = default [_] = /usr/sbin/apache2 ) [_POST] = Array ( ) [HTTP_POST_VARS] = Array ( ) [_GET] = Array ( ) [HTTP_GET_VARS] = Array ( ) [_COOKIE] = Array ( [PHPSESSID] = a959c533aa718bc94801431ae34f6fa6 ) [HTTP_COOKIE_VARS] = Array ( [PHPSESSID] = a959c533aa718bc94801431ae34f6fa6 ) [_SERVER] = Array ( [UNIQUE_ID] = 6jqHi38AAAEAAHn7e14J [HTTP_X_REQUESTED_WITH] = XMLHttpRequest [HTTP_ACCEPT_LANGUAGE] = de-at,en-us;q=0.5 [HTTP_REFERER] = http://webfischer.at/~albert/upload.php [HTTP_ACCEPT] = text/javascript, text/html, application/xml, text/xml, */* [HTTP_UA_CPU] = x86 [HTTP_ACCEPT_ENCODING] = gzip, deflate [HTTP_USER_AGENT] = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1) [HTTP_HOST] = webfischer.at [HTTP_CONNECTION] = Keep-Alive [HTTP_COOKIE] = PHPSESSID=a959c533aa718bc94801431ae34f6fa6 [PATH] = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.4.4 [SERVER_SIGNATURE] = Apache Server at webfischer.at Port 80 [SERVER_SOFTWARE] = Apache [SERVER_NAME] = webfischer.at [SERVER_ADDR] = 192.168.0.2 [SERVER_PORT] = 80 [REMOTE_ADDR] = 193.80.38.250 [DOCUMENT_ROOT] = /var/www/htdocs [SERVER_ADMIN] = [EMAIL PROTECTED] [SCRIPT_FILENAME] = /home/albert/public_html/upload2.php [REMOTE_PORT] = 62795 [GATEWAY_INTERFACE] = CGI/1.1 [SERVER_PROTOCOL] = HTTP/1.1 [REQUEST_METHOD] = GET [QUERY_STRING] = [REQUEST_URI] = /~albert/upload2.php [SCRIPT_NAME] = /~albert/upload2.php [PHP_SELF] = /~albert/upload2.php [REQUEST_TIME] = 1201426541 [argv] = Array ( ) [argc] = 0 ) [HTTP_SERVER_VARS] = Array ( [UNIQUE_ID] = 6jqHi38AAAEAAHn7e14J [HTTP_X_REQUESTED_WITH] = XMLHttpRequest
RE: [PHP] determine file-upload's tmp-filename
-Original Message- From: Michael Fischer [mailto:[EMAIL PROTECTED] Sent: Sunday, January 27, 2008 4:03 AM To: php-general@lists.php.net Subject: Re: [PHP] determine file-upload's tmp-filename Original-Nachricht Datum: Sat, 26 Jan 2008 16:09:58 -0800 Von: Casey [EMAIL PROTECTED] An: Michael Fischer [EMAIL PROTECTED] CC: php-general@lists.php.net Betreff: Re: [PHP] determine file-upload\'s tmp-filename On Jan 26, 2008 3:57 PM, Michael Fischer [EMAIL PROTECTED] wrote: hi there, is there a way to determine the tmp-filename of a file upload while the upload is still in progress? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? lg, Michi Will this help? http://tomas.epineer.se/archives/3 -- -Casey well, i've found this before and this script uses perl-cgi and not php. it determines the tmp-filename as such: $post_data_file = $tmp_dir/$sessionid._postdata; $monitor_file = $tmp_dir/$sessionid._flength; $error_file = $tmp_dir/$sessionid._err; $signal_file = $tmp_dir/$sessionid._signal; $qstring_file = $tmp_dir/$sessionid._qstring; i'm looking for something similar in php... lg, michi If all you want is to display a progress bar, you'd better move all of your logic to the client side. Check this out http://www.swfupload.org/documentation/demonstration Regards, Rob Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 | Email: [EMAIL PROTECTED] | MSN Chat: [EMAIL PROTECTED] | SKYPE: bestplace | Web: bestplace.biz | Web: seo-diy.com No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008 7:44 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] determine file-upload's tmp-filename
On Sun, 2008-01-27 at 11:12 -0500, Andrés Robinet wrote: -Original Message- From: Michael Fischer [mailto:[EMAIL PROTECTED] Sent: Sunday, January 27, 2008 4:03 AM To: php-general@lists.php.net Subject: Re: [PHP] determine file-upload's tmp-filename Original-Nachricht Datum: Sat, 26 Jan 2008 16:09:58 -0800 Von: Casey [EMAIL PROTECTED] An: Michael Fischer [EMAIL PROTECTED] CC: php-general@lists.php.net Betreff: Re: [PHP] determine file-upload\'s tmp-filename On Jan 26, 2008 3:57 PM, Michael Fischer [EMAIL PROTECTED] wrote: hi there, is there a way to determine the tmp-filename of a file upload while the upload is still in progress? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? lg, Michi Will this help? http://tomas.epineer.se/archives/3 -- -Casey well, i've found this before and this script uses perl-cgi and not php. it determines the tmp-filename as such: $post_data_file = $tmp_dir/$sessionid._postdata; $monitor_file = $tmp_dir/$sessionid._flength; $error_file = $tmp_dir/$sessionid._err; $signal_file = $tmp_dir/$sessionid._signal; $qstring_file = $tmp_dir/$sessionid._qstring; i'm looking for something similar in php... lg, michi If all you want is to display a progress bar, you'd better move all of your logic to the client side. Check this out http://www.swfupload.org/documentation/demonstration Regards, Rob Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 | Email: [EMAIL PROTECTED] | MSN Chat: [EMAIL PROTECTED] | SKYPE: bestplace | Web: bestplace.biz | Web: seo-diy.com No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 1/25/2008 7:44 PM You are right, the client side would be the best solution. BUT - this requires the client to either have flash or java browser plugin installed. i don't want that. and i don't know any way in javascript to get the amount of data already sent - so i thought i'd try on the server-side. lg, Michi -- Sautergasse 27-29/35 1160 Wien phone: 0043 650 2526276 email: [EMAIL PROTECTED] web: http://www.webfischer.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] determine file-upload's tmp-filename
On Jan 26, 2008 3:57 PM, Michael Fischer [EMAIL PROTECTED] wrote: hi there, is there a way to determine the tmp-filename of a file upload while the upload is still in progress? the tmp-file is stored in /tmp and it's name is something like PHP. 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. or do you think this is a completely useless approach? lg, Michi Will this help? http://tomas.epineer.se/archives/3 -- -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php