Skip to content

ofcold/flysystem-ali_oss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flysystem-ali_oss

AliYun OSS Storage adapter for flysystem.

Installation

	composer require ofcold/flysystem-ali_oss

Usage

  • Laravel Or pyrocms
	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

Packages

No packages published

Languages