RE: [PHP] upload file size
| From: | Johnson, Kirk | Date: | Fri, 14 Nov 2003 18:40:12 +0000 |
| Subject: | RE: [PHP] upload file size | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169669@lists.php.net to get a copy of this message | ||
> this could really kill my bandwidth. is there a way to check
> the file size
> without fully uploading the file?
Although it has been called an "urban legend" :), you could try the old
MAX_FILE_SIZE trick. For this, add a hidden tag before the <input
type="file"> tag:
<input type="hidden" name="MAX_FILE_SIZE" value="(your $ of bytes
here)">
This is an instruction to the browser to restrict the size of files that it
will attempt to upload, but browers are not required to honor it.
Kirk