zing/flysystem-tos

TOS filesystem adapter for Flysystem.

Fund package maintenance!
www.paypal.com/paypalme/zingimmick

Installs: 7 115

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/zing/flysystem-tos

2.0.1 2025-01-22 15:18 UTC

This package is auto-updated.

Last update: 2025-10-18 05:21:17 UTC


README

tests Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

Requires

Version Information

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

Usage

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);

Integration

Reference

league/flysystem-aws-s3-v3

License

Flysystem TOS is an open-sourced software licensed under the MIT license.