Blueimp Problem

Hi,

I’ve just install blueimp https://github.com/2amigos/yii2-file-upload-widget

and I don’t know why i can’t get any filest to controller.

My code:

view




<div class="panel panel-primary">

        <div class="panel-heading">

            <h3 class="panel-title"><?= Yii::t('app', 'Video upload') ?></h3>

        </div>

        <div class="panel-body">

            <?= FileUploadUI::widget([

                    'model' => $trainingVideo,

                    'attribute' => 'filename',

                    'url' => ['training/upload-video?id='.$training->id],

                    'gallery' => false,

                    'fieldOptions' => [

                        'accept' => '*'

                    ],

                    'clientOptions' => [

                        'maxFileSize' => 200000000

                    ],

                ]);

            ?>

        </div>

    </div>



controller




public function actionUploadVideo($id)

    {

        try

        {

            $trainingVideo = new TrainingVideo();

            $trainingVideo->load(Yii::$app->request->post());

            $trainingVideo->training_id = $id;

            $trainingVideo->filename = UploadedFile::getInstance($trainingVideo, 'filename');


            if ($trainingVideo->filename->name != '')

            {

                $filename = md5(time()).'-'.$trainingVideo->filename->name;

                $trainingVideo->filename->saveAs(\Yii::$app->getBasePath().'/web/files/video/'.$filename);

                $trainingVideo->filename = $filename;

            }

            else

            {

                $trainingVideo->gallery_filename = '';

            }


            $trainingVideo->save();


        }

        catch (Exception $e)

        {

            return 'fail';

        }


    }



when I dump my $_FILES i’ve got empty array




array (size=0)  empty



What is wrong there, can anybody help me?

ther’s no help here?