Пример #1
0
 private function removeUploadDir($dir)
 {
     BaseFileHelper::removeDirectory(Comkarupan::getUploadPath() . $dir);
 }
Пример #2
0
 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;
 }