/** * Sets path to target directory where to save video file. * @param string $dir * @throws \yii\base\Exception */ public function setTargetDir($dir) { $this->_targetDir = $dir; if (!is_dir($this->_targetDir)) { FileHelper::createDirectory($this->_targetDir); } }