visuddhinanda 2 лет назад
Родитель
Сommit
2c4bba5d3a

+ 1 - 1
app/Console/Commands/ExportZip.php

@@ -96,7 +96,7 @@ class ExportZip extends Command
                 ];
         }
 
-        $bucket = config('mint.attachments_bucket_name');
+        $bucket = config('mint.attachments.bucket_name.temporary');
         $tmpFile =  $bucket.'/'. $zipFile ;
 
         $this->info('upload file='.$tmpFile);

+ 1 - 1
app/Http/Controllers/OfflineIndexController.php

@@ -24,7 +24,7 @@ class OfflineIndexController extends Controller
             $fileInfo = RedisClusters::get('/offline/index');
             foreach ($fileInfo as $key => $file) {
                 $zipFile = $file['filename'];
-                $bucket = config('mint.attachments_bucket_name');
+                $bucket = config('mint.attachments.bucket_name.temporary');
                 $tmpFile =  $bucket.'/'. $zipFile ;
                 $url = array();
                 foreach (config('mint.server.cdn_urls') as $key => $cdn) {

+ 6 - 1
config/mint.php

@@ -30,7 +30,12 @@ return [
 
     ],
 
-    'attachments_bucket_name' => env('ATTACHMENTS_BUCKET_NAME', "attachments-staging"),
+    'attachments' => [
+        'bucket_name' => [
+            'temporary' => env('ATTACHMENTS_TEMPORARY_BUCKET_NAME', "attachments-staging"),
+            'permanent' => env('ATTACHMENTS_PERMANENT_BUCKET_NAME', "attachments-staging"),
+        ],
+    ],
 
     'cache' => [
         //这个值prod,staging无需设置