<?php

return [

    // 最大上传文件字节数, 5 * 1024 * 1024 = 5m
    'max_upload_size' => 5 * 1024 * 1024,

    'upload_path' => 'uploads',

    'driver' => env('FILESYSTEM_DRIVER', 'public'),

    'disks' => [
        'public' => [
            'driver'     => 'local',
            'root'       => storage_path('app/public'),
            'url'        => env('APP_URL').'/storage',
            'visibility' => 'public',
        ],

        'oss' => [
            'driver'     => 'oss',
            'root'       => '', // 设置上传时根前缀
            'access_key' => env('OSS_ACCESS_KEY'),
            'secret_key' => env('OSS_SECRET_KEY'),
            'endpoint'   => env('OSS_ENDPOINT'),
            'bucket'     => env('OSS_BUCKET'),
            'isCName'    => env('OSS_IS_CNAME', false),
            'cdnHost'    => env('OSS_CDN_HOST'),
            'buckets'    => [
                'test' => [
                    'access_key' => env('OSS_ACCESS_KEY'),
                    'secret_key' => env('OSS_SECRET_KEY'),
                    'bucket'     => env('OSS_TEST_BUCKET'),
                    'endpoint'   => env('OSS_TEST_ENDPOINT'),
                    'isCName'    => env('OSS_TEST_IS_CNAME', false),
                    'cdnHost'    => env('OSS_TEXT_CDN_HOST'),
                ],
            ],
            // 以下是STS用的，不使用STS直传可不用配置
            'RegionId'   => env('OSS_STS_REGION_ID', 'cn-beijing'),
            'RoleArn'    => env('OSS_STS_ROLE_ARN', ''),
        ],
    ],

];
