Re: file Upload - checking file size before uploading

From: Date: Wed, 10 May 2006 16:48:25 +0000
Subject: Re: file Upload - checking file size before uploading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235919@lists.php.net to get a copy of this message
Jay Blanchard wrote:
[snip] Is there anyway to check the size of a file before it starts uploading it? For instance, if the file is huge, and takes ages to upload, and is then rejected by the server, the user will be somewhat annoyed! [/snip] PHP is server-side and cannot check anything client-side. You cold use something client-side, like JavaScript, to check the file size and then deliver a warning if the file is too large.
please, how do you do that with javascript - given the sandbox that javascript runs in which doesn't allow access to the file system (IE security bugs and v. special browser settings not with standing)?


« previous php.general (#235919) next »