PHP code example of cdxmj / laravel-qingstor-storage

1. Go to this page and download the library: Download cdxmj/laravel-qingstor-storage 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/ */

    

cdxmj / laravel-qingstor-storage example snippets


            // 在config/filesystems.php disks数组添加如下代码
            'qingstor' => [
                'driver' => 'QingStor',
                'bucket' => 'My Bucket',
                'zone' => 'My Zone',
                'access_key_id' => 'Access ID', // 青云App Key
                'secret_access_key' => 'Access Secret', //青云App Secret
                'domain'    => 'src.xxx.com',
                'protocol'  => 'http', // 服务使用的协议,如需使用 http,在此配置 http
            ],
    

            \Storage::put($path, $content);
            

            \Storage::disk('qingstor')->put($path, $content);