upload file and image in Yii 2.0

<?php $form = ActiveForm::begin(['options'=>['enctype'=>'multipart/form-data']]); ?>


<?= $form->field($model, 'filePath')->fileInput() ?>