RE: [PHP] determine file-upload's tmp-filename
| From: | Michael Fischer | Date: | Sun, 27 Jan 2008 17:19:50 +0000 |
| Subject: | RE: [PHP] determine file-upload's tmp-filename | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268171@lists.php.net to get a copy of this message | ||
On Sun, 2008-01-27 at 11:12 -0500, Andrés Robinet wrote:
> > -----Original Message-----
> > From: Michael Fischer [mailto:michi.fischer@gmx.net]
> > 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 <heavyccasey@gmail.com>
> > > An: "Michael Fischer" <michi.fischer@gmx.net>
> > > CC: php-general@lists.php.net
> > > Betreff: Re: [PHP] determine file-upload\'s tmp-filename
> >
> > > On Jan 26, 2008 3:57 PM, Michael Fischer <michi.fischer@gmx.net>
> > 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
> > > 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.
> > > >
> > > > 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: info@bestplace.net | MSN Chat: best@bestplace.net | 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: michi.fischer@gmx.net
web: http://www.webfischer.at