Skip to content

Commit

Permalink
FIX UploadField incorrectly setting max upload size
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Nov 24, 2016
1 parent 406307c commit dd9ade4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions forms/UploadField.php
Expand Up @@ -220,11 +220,6 @@ public function __construct($name, $title = null, SS_List $items = null) {
$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));
}

/**
Expand Down

0 comments on commit dd9ade4

Please sign in to comment.