Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function register() |
||
14 | { |
||
15 | app('filesystem')->extend('wantu', function ($app, $config) { |
||
16 | $adapter = new WantuFileAdapter( |
||
17 | $config['access_key'], |
||
18 | $config['secret_key'], |
||
19 | $config['namespace'], |
||
20 | $config['domain'] |
||
21 | ); |
||
22 | $flysystem = new Filesystem($adapter, new Config(['disable_asserts' => true])); |
||
23 | // $flysystem->addPlugin(new FetchFile()); |
||
24 | $flysystem->addPlugin(new UploadToken()); |
||
25 | $flysystem->addPlugin(new GetUrl()); |
||
26 | // $flysystem->addPlugin(new PrivateDownloadUrl()); |
||
27 | // $flysystem->addPlugin(new RefreshFile()); |
||
28 | return $flysystem; |
||
29 | }); |
||
32 |