library flysystem-ali_oss
Flysystem for Aliyun OSS.
ofcold/flysystem-ali_oss
Flysystem for Aliyun OSS.
- Monday, April 23, 2018
- by bill@anomalylab.org
- Repository
- 1 Watchers
- 1 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
flysystem-ali_oss
AliYun OSS Storage adapter for flysystem., (*1)
Installation
composer require ofcold/flysystem-ali_oss
Usage
use League\Flysystem\Filesystem;
use League\Flysystem\MountManager;
use Illuminate\Filesystem\FilesystemManager;
$driver = new Filesystem(new OssAdapter(
new OssClient(
'key',
'secret',
'endpoint'
),
'bucket',
'endpoint',
'Your prefix'
));
app(MountManager::class)->mountFilesystem($prefix, $driver);
app(FilesystemManager::class)->extend(
$this->disk->getSlug(),
function () use ($driver) {
return $driver;
}
);
Reference