We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第一处
Storage::extend('oss', function($app, $config) { $accessId = $config['access_id']; $accessKey = $config['access_key']; $cdnDomain = empty($config['cdnDomain']) ? '' : $config['cdnDomain']; $bucket = $config['bucket']; $ssl = empty($config['ssl']) ? false : $config['ssl']; $isCname = empty($config['isCName']) ? false : $config['isCName']; $debug = empty($config['debug']) ? false : $config['debug']; $endPoint = $config['endpoint']; // 默认作为外部节点 // TODO: 这里和文档描述不一致 $epInternal= $isCname?$cdnDomain:(empty($config['endpoint_internal']) ? $endPoint : $config['endpoint_internal']); // 内部节点 if($debug) Log::debug('OSS config:', $config); $client = new OssClient($accessId, $accessKey, $epInternal, $isCname); $adapter = new AliOssAdapter($client, $bucket, $endPoint, $ssl, $isCname, $debug, $cdnDomain); //Log::debug($client); $filesystem = new Filesystem($adapter); $filesystem->addPlugin(new PutFile()); $filesystem->addPlugin(new PutRemoteFile()); //$filesystem->addPlugin(new CallBack()); return $filesystem; });
第二处
public function getUrl( $path ) { // TODO: 这里判断文件是否存在,批量获取的时候回比较影响性能,考虑是否要加个配置项 if (!$this->has($path)) throw new FileNotFoundException($filePath.' not found'); return ( $this->ssl ? 'https://' : 'http://' ) . ( $this->isCname ? ( $this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain ) : $this->bucket . '.' . $this->endPoint ) . '/' . ltrim($path, '/'); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
第一处
第二处
The text was updated successfully, but these errors were encountered: