@@ -42,18 +42,18 @@ |
||
42 | 42 | $isCname = empty($config['isCName']) ? false : $config['isCName']; |
43 | 43 | $securityToken = empty($config['securityToken']) ? null : $config['securityToken']; |
44 | 44 | $debug = empty($config['debug']) ? false : $config['debug']; |
45 | - $options = empty($config['options']) ? ['Multipart' => 128] : $config['options']; |
|
45 | + $options = empty($config['options']) ? ['Multipart' => 128] : $config['options']; |
|
46 | 46 | |
47 | 47 | $endPoint = $config['endpoint']; // 默认作为外部节点 |
48 | - $epInternal= $isCname?$cdnDomain:(empty($config['endpoint_internal']) ? $endPoint : $config['endpoint_internal']); // 内部节点 |
|
48 | + $epInternal = $isCname ? $cdnDomain : (empty($config['endpoint_internal']) ? $endPoint : $config['endpoint_internal']); // 内部节点 |
|
49 | 49 | |
50 | - if($debug) Log::debug('OSS config:', $config); |
|
50 | + if ($debug) Log::debug('OSS config:', $config); |
|
51 | 51 | |
52 | 52 | $client = new OssClient($accessId, $accessKey, $epInternal, $isCname, $securityToken, $options); |
53 | 53 | $adapter = new AliOssAdapter($client, $bucket, $endPoint, $ssl, $isCname, $debug, $cdnDomain, $options); |
54 | 54 | |
55 | 55 | //Log::debug($client); |
56 | - $filesystem = new Filesystem($adapter); |
|
56 | + $filesystem = new Filesystem($adapter); |
|
57 | 57 | |
58 | 58 | $filesystem->addPlugin(new PutFile()); |
59 | 59 | $filesystem->addPlugin(new PutRemoteFile()); |
@@ -47,7 +47,9 @@ |
||
47 | 47 | $endPoint = $config['endpoint']; // 默认作为外部节点 |
48 | 48 | $epInternal= $isCname?$cdnDomain:(empty($config['endpoint_internal']) ? $endPoint : $config['endpoint_internal']); // 内部节点 |
49 | 49 | |
50 | - if($debug) Log::debug('OSS config:', $config); |
|
50 | + if($debug) { |
|
51 | + Log::debug('OSS config:', $config); |
|
52 | + } |
|
51 | 53 | |
52 | 54 | $client = new OssClient($accessId, $accessKey, $epInternal, $isCname, $securityToken, $options); |
53 | 55 | $adapter = new AliOssAdapter($client, $bucket, $endPoint, $ssl, $isCname, $debug, $cdnDomain, $options); |