PHP code example of zing / laravel-flysystem-tos

1. Go to this page and download the library: Download zing/laravel-flysystem-tos library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zing / laravel-flysystem-tos example snippets


return [
    // ...
    'disks' => [
        // ...
        'tos' => [
            'driver' => 'tos',
            'root' => '',
            'access_key_id' => env('TOS_ACCESS_KEY_ID'),
            'access_key_secret' => env('TOS_ACCESS_KEY_SECRET'),
            'bucket' => env('TOS_BUCKET'),
            'endpoint' => env('TOS_ENDPOINT'),
            'is_cname' => env('TOS_IS_CNAME', false),
            'security_token' => env('TOS_SECURITY_TOKEN'),
        ],
    ]
];