dezsidog/laravel-baidu-bos

this is a laravel package for baidu bos

0.1.3 2018-02-11 01:25 UTC

This package is auto-updated.

Last update: 2024-04-17 18:47:35 UTC


README

this is a package for laravel storage by baidu bos sdk

install

composer require dezsidog/laravel-baidu-bos

Configuration

Edit config\filesystems.php:

Add bos disk

'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 ''
    ],
],

usage

laravel document