mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-03 05:54:32 +01:00
FileValidator - fixed error message on UPLOAD_ERR_FORM_SIZE
Closes #10660
This commit is contained in:
@@ -249,7 +249,11 @@ class FileValidator extends Validator
|
||||
}
|
||||
case UPLOAD_ERR_INI_SIZE:
|
||||
case UPLOAD_ERR_FORM_SIZE:
|
||||
return [$this->tooBig, ['file' => $file->name, 'limit' => $this->getSizeLimit()]];
|
||||
return [$this->tooBig, [
|
||||
'file' => $file->name,
|
||||
'limit' => $this->getSizeLimit(),
|
||||
'formattedLimit' => Yii::$app->formatter->asShortSize($this->minSize)
|
||||
]];
|
||||
case UPLOAD_ERR_PARTIAL:
|
||||
Yii::warning('File was only partially uploaded: ' . $file->name, __METHOD__);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user