Media file uploading

Hello to everybody!

Please help me guys I’m beginner in Yii2 and got troubles with media file uploading…

Ex. of my script

public function actionCreate(){

$model = new Meridians();

if ($model->load(Yii::$app->request->post()) && $model->save()) {


   $model->videoFile = UploadedFile::getInstance($model, 'videoFile');

   ....... continue .......



the problem is that $model->videoFile->tempName is empty and $model->videoFile->error is 1

but no message appears about error. In view I’m using active ActiveForm


$form = ActiveForm::begin([‘options’ => [‘enctype’ => ‘multipart/form-data’]]);

 $model = new Form1();         

      if ($model->load(Yii::$app->request->post())){  

           $image = UploadedFile::getInstance($model, 'image');   

          if ($image) {             

    $image->saveAs('uploads/' . $image->baseName . '.' . $image->extension);    

             $model->image = $image->name;