Skip to content

Commit

Permalink
'bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
yidashi committed Mar 2, 2017
1 parent dffeb6f commit dfb664a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/modules/attachment/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function bootstrap($app)
'class' => 'creocoder\flysystem\LocalFilesystem',
'path' => '@storagePath/upload',
],
'baseUrl' => '@storagePath/upload',
'baseUrl' => '@storageUrl/upload',
'imageProcessor' => 'common\modules\attachment\components\image\Local'
];
if (isset($this->params['filesystem_type'])) {
Expand All @@ -33,7 +33,7 @@ public function bootstrap($app)
'secret' => $this->params['qiniu_access_secret'],
'bucket' => $this->params['qiniu_bucket'],
];
$storage['baseUrl'] = 'http:https://image.51siyuan.cn';
$storage['baseUrl'] = $this->params['qiniu_domain'];
$storage['imageProcessor'] = [
'class' => 'common\\modules\\attachment\\components\\image\\Qiniu'
];
Expand Down
2 changes: 1 addition & 1 deletion common/modules/attachment/components/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function init()
parent::init();
$this->baseUrl = \Yii::getAlias($this->baseUrl);
$this->fs = \Yii::createObject($this->fs);
$this->imageProcessor = \Yii::createObject(ArrayHelper::merge(['baseUrl' => $this->baseUrl], $this->imageProcessor));
$this->imageProcessor = \Yii::createObject($this->imageProcessor, ['baseUrl' => $this->baseUrl]);
}

public function getPath($url)
Expand Down

0 comments on commit dfb664a

Please sign in to comment.