1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- return [
- 'enable' => true,
- 'storage' => [
- 'default' => 'local',
- 'single_limit' => 1024 * 1024 * 200,
- 'total_limit' => 1024 * 1024 * 200,
- 'nums' => 10,
- 'include' => ['jpg', 'jpeg', 'png', 'gif','mp4'],
- 'exclude' => [],
-
- 'local' => [
- 'adapter' => app\common\storage\LocalAdapter::class,
- 'root' => public_path() . '/storage/',
- 'dirname' => function () {
- return date('Ymd');
- },
- 'domain' => getenv('STORAGE_DOMAIN', 'http://127.0.0.1:8787'),
- 'uri' => '/storage/',
- 'algo' => 'sha1',
- ],
-
- 'oss' => [
- 'adapter' => \Tinywan\Storage\Adapter\OssAdapter::class,
- 'accessKeyId' => 'xxxxxxxxxxxx',
- 'accessKeySecret' => 'xxxxxxxxxxxx',
- 'bucket' => 'resty-webman',
- 'dirname' => function () {
- return 'storage';
- },
- 'domain' => 'http://webman.oss.tinywan.com',
- 'endpoint' => 'oss-cn-hangzhou.aliyuncs.com',
- 'algo' => 'sha1',
- ],
-
- 'cos' => [
- 'adapter' => \Tinywan\Storage\Adapter\CosAdapter::class,
- 'secretId' => 'xxxxxxxxxxxxx',
- 'secretKey' => 'xxxxxxxxxxxx',
- 'bucket' => 'resty-webman-xxxxxxxxx',
- 'dirname' => 'storage',
- 'domain' => 'http://webman.oss.tinywan.com',
- 'region' => 'ap-shanghai',
- ],
-
- 'qiniu' => [
- 'adapter' => \Tinywan\Storage\Adapter\QiniuAdapter::class,
- 'accessKey' => 'xxxxxxxxxxxxx',
- 'secretKey' => 'xxxxxxxxxxxxx',
- 'bucket' => 'resty-webman',
- 'dirname' => 'storage',
- 'domain' => 'http://webman.oss.tinywan.com',
- ],
- ],
- ];
|