Re: Quickform maxFileSize request for change in behaviour

From: Date: Wed, 27 Jul 2005 12:50:09 +0000
Subject: Re: Quickform maxFileSize request for change in behaviour
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38969@lists.php.net to get a copy of this message
Hi Bertrand, It's a required hidden element for forms dealing with file uploads which > specifies the maximum uploaded file size. The php.ini value and the value > you > use in your forms can differ. Of course they can differ. After the patch they can still differ. But if you use: $form->setMaxFileSize(4194304) to set the maximum upload filesize to 4 megabytes, while in php.ini the maximum is 2MB, the maximum will effectively be 2MB, not 4MB. This means that this setting determines the final maximum upload size, not Quickform. >- The default setting Quickform chooses for maxFileSize seems quite > >arbitrary (has there been discussion about this?) > > That's true. But the value in php.ini is also arbitrary, so you can't rely > on it > neither. The value normally is 2MB (if I remember correctly), which is arbitrary. But if you've specified this to 10MB this isn't arbitrary anymore, but a conscious choice, whilst the value of HTML_Quickform remains arbitrary. I am reluctant to change the default value because this might be seen as a > backward compatibility break by some users. But we will take this into > account > in a next major version. > Users who didn't care to set the maximum file size probably don't care if this value will be synchronised to the value of php.ini. Kind regards, Yuri

« previous php.pear.dev (#38969) next »