PHP code example of neatstudio / otter-oss

1. Go to this page and download the library: Download neatstudio/otter-oss 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/ */

    

neatstudio / otter-oss example snippets


        'oss' => [
            'driver'         => 'oss',
            'ram_arn'        => env('ALIYUN_RAM_ARN', null),
            'app_key'        => env('OSS_APP_KEY', null),
            'app_secret'     => env('OSS_APP_SECRET', null),
            'policy_expired' => env('ALIYUN_RAM_ARN_EXPIRED', 3600),
            'access_id'      => env('OSS_ACCESS_ID', 'your id'),
            'access_key'     => env('OSS_ACCESS_KEY', 'your key'),
            'bucket'         => env('OSS_BUCKET', env('OSS_PUBLIC_BUCKET','your bucket')),
            'endpoint'       => env('OSS_ENDPOINT', 'your endpoint'),
            'prefix'         => env('OSS_PREFIX', ''), // optional
            'url'            => env('OSS_PUBLIC_URL', ''),
        ],

$adapter = new AliOssAdapter($config);
$flysystem = new League\Flysystem\Filesystem($adapter);

Storage::disk('oss')->xxx()