|
|
@ -201,10 +201,7 @@ class CategoryController extends Controller |
|
|
|
$model->user_id = Yii::$app->user->identity->id; |
|
|
|
$model->name = $file_name; |
|
|
|
$file_manager = new \backend\modules\file\logic\file\FileManager(); |
|
|
|
$type_res = $file_manager->searchType(\backend\modules\file\logic\file\FileManager::$extension, pathinfo($data['path'])['extension']); |
|
|
|
if ($type_res['status']) { |
|
|
|
$model->type = $type_res['type']; |
|
|
|
} |
|
|
|
$model->type = $file_manager->searchType(pathinfo($data['path'])['extension']); |
|
|
|
$model->alias = $data['alias']; |
|
|
|
$model->path = $data['path']; |
|
|
|
$model->save(); |
|
|
|