RE: [PHP] file upload size, before upload complete

2001-08-30 Thread Joseph Bannon

Yes, I use to do this with my site.


# The original name of the file on the client machine.
$filename = $HTTP_POST_FILES['file']['name'];

# The mime type of the file, if the browser provided this information. An
example would be image/gif. 
$filetype = $HTTP_POST_FILES['file']['type'];

# The size, in bytes, of the uploaded file.
$filesize = $HTTP_POST_FILES['file']['size'];
 
# The temporary filename of the file in which the uploaded file was stored
on the server. 
$filetemp = $HTTP_POST_FILES['file']['tmp_name'];




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] file upload size, before upload complete

2001-08-30 Thread * RzE:

Original message
From: christopher johnson [EMAIL PROTECTED]
Date: Thu, Aug 30, 2001 at 12:47:00PM -0500
Message-ID: [EMAIL PROTECTED]
Subject: [PHP] file upload size, before upload complete

 Can anyone think of a way to determine the file size of what the user is
 uploading before it has been fully uploaded?
 I know because of security restrictions javascript can't do this, but is it
 possible in php?
 I'm trying to make an upload progress bar, it doesn't have to be exact, but
 a close approximation would be nice.
 
   Thanks,
 Chris

/Original message

Reply

Not possible. You first have to submit the form before the PHP
starts. And then it's too late, 'cause at the moment you submit the
form, the files are already being uploaded.
You should really have a client-side solution for this (if there is
any).

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]