FIX UploadField incorrectly setting max upload size

This commit is contained in:
Daniel Hensby 2016-11-04 15:24:27 +00:00
parent 406307c77b
commit dd9ade4294
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -220,11 +220,6 @@ class UploadField extends FileField {
$this->getValidator()->setAllowedExtensions(
array_filter(Config::inst()->get('File', 'allowed_extensions'))
);
// get the lower max size
$maxUpload = File::ini2bytes(ini_get('upload_max_filesize'));
$maxPost = File::ini2bytes(ini_get('post_max_size'));
$this->getValidator()->setAllowedMaxFileSize(min($maxUpload, $maxPost));
}
/**