illusionist/flysystem-aliyun-oss
Larablocks Analysis
illusionist/flysystem-aliyun-oss works with any PHP project: the latest release (1.0.1, Feb 24, 2022) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Feb 24, 2022)
- 15 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Feb 24, 2022.
- No releases in the last 12 months.
- First released: Feb 24, 2022.
- Monthly downloads: 15, up 50% from six months ago.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require illusionist/flysystem-aliyun-oss |
|
| Latest Version: | 1.0.1 |
| PHP: | >=5.5.9 |
| License: | MIT |
| Last Updated: | Feb 24, 2022 |
| Links: | GitHub · Packagist |
Illusionist Flysystem Aliyun OSS
Advantages
- Support Laravel & Lumen
- Compared with xxtime/flysystem-aliyun-oss, it is more in line with the flysystem interface specification. Because the flysystem interface suggests that the return value is array or bool, but xxtime/flysystem-aliyun-oss is not very strict about exception handling.
- Compared to apollopy/flysystem-aliyun-oss <= 1.2.0 supports visibility get/set.
- Support Dynamically call OSS SDK methods.
ps: The comparison of similar projects is only to highlight the differences. In fact, they are all very good.
Installation
Install via composer
Run the following command to pull in the latest version:
composer require illusionist/flysystem-aliyun-oss
Laravel Install
If your laravel version <=5.4, Add the service provider to the providers array in the config/app.php config file as follows:
'providers' => [
...
Illusionist\Flysystem\Aliyun\OssServiceProvider::class,
]
Lumen Install
Add the following snippet to the bootstrap/app.php file under the providers section as follows:
...
// Add this line
$app->register(Illusionist\Flysystem\Aliyun\OssServiceProvider::class);
Config for Laravel/Lumen
Add the adapter config to the disks array in the config/filesystems.php config file as follows:
'disks' => [
...
'aliyun-oss' => [
'driver' => 'aliyun-oss',
/**
* The AccessKeyId from OSS or STS.
*/
'key' => '<your AccessKeyId>',
/**
* The AccessKeySecret from OSS or STS
*/
'secret' => '<your AccessKeySecret>',
/**
* The domain name of the datacenter.
*
* @example: oss-cn-hangzhou.aliyuncs.com
*/
'endpoint' => '<endpoint address>',
/**
* The bucket name for the OSS.
*/
'bucket' => '<bucket name>',
/**
* The security token from STS.
*/
'token' => null,
/**
* If this is the CName and binded in the bucket.
*
* Values: true or false
*/
'cname' => false,
/**
* Path prefix
*/
'prefix' => '',
/**
* Request header options.
*
* @example [x-oss-server-side-encryption => 'KMS']
*/
'options' => []
]
]
Usage
Basic
Please refer to filesystem-api.
use Illusionist\Flysystem\Aliyun\OssAdapter;
use League\Flysystem\Filesystem;
use OSS\OssClient;
$client = new OssClient(
'<your AccessKeyId>',
'<your AccessKeySecret>',
'<endpoint address>'
);
$adapter = new OssAdapter($client, '<bucket name>', 'optional-prefix', 'optional-options');
$filesystem = new Filesystem($adapter);
$filesystem->has('file.txt');
// Dynamic call SDK method.
$adapter->setTimeout(30);
$filesystem->getAdapter()->setTimeout(30);
Laravel/Lumen
Please refer to filesystem
use Illuminate\Support\Facades\Storage;
Storage::disk('aliyun-oss')->get('path');
// Dynamic call SDK method.
Storage::disk('aliyun-oss')->getAdapter()->setTimeout(30);
Related Packages
Filesystem library based on Laravel and Symfony with a lot of extras. Provides a...
A laravel/lumen FileSystem that use Eloquent as datastore, inspired by GridFS (M...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.0.1 | >=5.5.9 | MIT | |
| 1.0.0 | >=5.5.9 | MIT |