Skip to content

Commit

Permalink
修复上传目录设置
Browse files Browse the repository at this point in the history
  • Loading branch information
moxuandi committed Oct 4, 2018
1 parent 9cf8f78 commit fccab3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UEditorUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use Yii;
use yii\base\Action;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
use moxuandi\helpers\Helper;
use moxuandi\helpers\Uploader;
Expand Down Expand Up @@ -119,6 +120,8 @@ private function actionUpload()
break;
}

$config['rootPath'] = ArrayHelper::getValue($this->config, 'rootPath', dirname(Yii::$app->request->scriptFile));

// 生成上传实例对象并完成上传, 返回结果数据
$upload = new Uploader($fieldName, $config, $base64);
return Json::encode([
Expand Down

0 comments on commit fccab3c

Please sign in to comment.