note 95539 deleted from features.file-upload.errors by danbrown

From: Date: Thu, 07 Jan 2010 21:25:27 +0000
Subject: note 95539 deleted from features.file-upload.errors by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164767@lists.php.net to get a copy of this message
Note Submitter: paulabean73 at gmail dot com ---- @svenr at selfhtml dot org 23-Apr-2007 10:15: Your "rant" about MAX_FILE_SIZE is unjustified. PHP introduced this feature in the hope that user agents would implement client side checking. This would prevent the user from uploading a (potentially big) file and only discovering it violated the file size limits afterwards. You also fail to understand some basic English words. You write that it has never been true that this allows browsers to check the file size. Even though no browser does this as of yet, it still *allows* the browser to do it. You also write that it is "simply wrong" that the PHP documentation implies that a browser may alert the user. The key word here is "may". Again, even though no browser does it, user ages *may* do it. Finally you conclude with an advice against using this hidden form field, because you should always check server side. These two however are not mutually exclusive, and any sane web developer knows they should *always* check everything server side, because the client can never be trusted. This feature is not a security mechanism, but rather a conveniency for browsers. I personally think it is a shame no browser has implemented it yet, because it would save a lot of time uploading files and discovering they were too big afterwards.

« previous php.notes (#164767) next »