mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #1020 from NightJar/fix/5.7/maxfilesize
FIX correctly calculate MaxFileSizeMB
This commit is contained in:
commit
8dd6950218
@ -185,7 +185,7 @@ class EditableFileField extends EditableFormField
|
|||||||
$result = parent::validate();
|
$result = parent::validate();
|
||||||
|
|
||||||
$max = static::get_php_max_file_size();
|
$max = static::get_php_max_file_size();
|
||||||
if ($this->MaxFileSizeMB * 1024 > $max) {
|
if ($this->MaxFileSizeMB * 1024 * 1024 > $max) {
|
||||||
$result->addError("Your max file size limit can't be larger than the server's limit of {$this->getPHPMaxFileSizeMB()}.");
|
$result->addError("Your max file size limit can't be larger than the server's limit of {$this->getPHPMaxFileSizeMB()}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user