yii2 file upload rules
- By Preneesh AV --
- 17-Dec-2019 --
- 188 Comments
yii2 file upload rules
public $imageFile;
public function rules() {
return [
[['imageFile'], 'file', 'extensions' => 'jpg,png','maxSize' => 256000, 'tooBig' => 'File upload size limit is 256KB','maxFiles' => 6],
];
}