PHP code example of dezsidog / laravel-baidu-bos

1. Go to this page and download the library: Download dezsidog/laravel-baidu-bos 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/ */

    

dezsidog / laravel-baidu-bos example snippets


'disks' => [
    'local' => [
        'driver' => 'local',
        'root'   => storage_path().'/app',
    ],
    
    's3' => [
        'driver' => 's3',
        'key'    => 'your-key',
        'secret' => 'your-secret',
        'region' => 'your-region',
        'bucket' => 'your-bucket',
    ],
    
    'rackspace' => [
        'driver'    => 'rackspace',
        'username'  => 'your-username',
        'key'       => 'your-key',
        'container' => 'your-container',
        'endpoint'  => 'https://identity.api.rackspacecloud.com/v2.0/',
        'region'    => 'IAD',
        'url_type'  => 'publicURL'
    ],
    'baidu-bos' => [
        'driver' => 'baidu-bos',
        'accessKeyId' => 'your-ak',
        'secretAccessKey' => 'your-sk',
        'sessionToken' => 'your-token',
        'endpoint' => 'your-endpoint',
        'stsEndpoint' => 'your-sts-endpoint',
        'bucket' => 'amiedu',
        
        //if use Storage::url(path); file this
        'protocol' => 'http:// or https://',
        'domain' => 'www.xxxx.com',
        'uri_prefix' => 'upload',//this can be ''
    ],
],