Requires
Version | Flysystem | PHP Version | Status |
---|---|---|---|
2.x | 3.10+ | >= 8.0 | Active support 🚀 |
1.x | 1.x | >= 7.2 | Active support |
Require Flysystem TOS using Composer:
composer require zing/flysystem-tos
use League\Flysystem\Filesystem;
use Tos\TosClient;
use Zing\Flysystem\Tos\TosAdapter;
$prefix = '';
$config = [
'ak' => 'aW52YWxpZC1rZXk=',
'sk' => 'aW52YWxpZC1zZWNyZXQ=',
'region' => 'cn-shanghai',
'bucket' => 'test',
'endpoint' => 'tos-cn-shanghai.volces.com',
];
$config['options'] = [
'url' => '',
'endpoint' => $config['endpoint'],
'bucket_endpoint' => '',
'temporary_url' => '',
];
$client = new TosClient($config);
$adapter = new TosAdapter($client, $config['bucket'], $prefix, null, null, $config['options']);
$flysystem = new Filesystem($adapter);
- Laravel: zing/laravel-flysystem-tos
Flysystem TOS is an open-sourced software licensed under the MIT license.