浏览代码

Add spaces filesystem driver

Daniel Supernault 6 年之前
父节点
当前提交
a6228ffce7
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      config/filesystems.php

+ 15 - 0
config/filesystems.php

@@ -65,6 +65,21 @@ return [
             'endpoint' => env('AWS_ENDPOINT'),
         ],
 
+        'spaces' => [
+            'driver' => 's3',
+            'key' => env('DO_SPACES_KEY'),
+            'secret' => env('DO_SPACES_SECRET'),
+            'endpoint' => env('DO_SPACES_ENDPOINT'),
+            'region' => env('DO_SPACES_REGION'),
+            'bucket' => env('DO_SPACES_BUCKET'),
+            'visibility' => 'public',
+            'options' => [
+                'CacheControl' => 'max-age=31536000'
+            ],
+            'root' => env('DO_SPACES_ROOT','/'),
+            'url' => str_replace(env('DO_SPACES_REGION'),env('DO_SPACES_BUCKET').'.'.env('DO_SPACES_REGION'),str_replace("digitaloceanspaces","cdn.digitaloceanspaces",env('DO_SPACES_ENDPOINT'))),
+        ],
+
     ],
 
 ];