private function removeUploadDir($dir) { BaseFileHelper::removeDirectory(Comkarupan::getUploadPath() . $dir); }
private function createThumbnail($folderName, $fileName, $width = 250) { $uploadPath = Comkarupan::getUploadPath() . '/' . $folderName . '/'; $file = $uploadPath . $fileName; $image = Yii::$app->image->load($file); $image->resize($width); $image->save($uploadPath . 'thumbnail/' . $fileName); return; }