Kaynağa Gözat

Merge branch 'master' of moshaorui/mtb_dcatadmin_album into stable

moshaorui 4 hafta önce
ebeveyn
işleme
7702e3d6ed
2 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 4 0
      .env.dev
  2. 1 0
      app/Console/Commands/GeneratePreviewVideo.php

+ 4 - 0
.env.dev

@@ -74,3 +74,7 @@ OSS_ENDPOINT=oss-cn-hongkong.aliyuncs.com
 #OSS_DOMAIN=mietubl-dev.oss-accelerate.aliyuncs.com
 
 
+#视频预览OSS配置
+PREVIEW_OSS_URL=https://mietublcom.oss-cn-hongkong.aliyuncs.com
+#视频预览OSS配置,内网上传,上线时开
+#PREVIEW_OSS_URL_INTERNAL=https://mietublcom.oss-cn-hongkong-internal.aliyuncs.com

+ 1 - 0
app/Console/Commands/GeneratePreviewVideo.php

@@ -150,6 +150,7 @@ class GeneratePreviewVideo extends Command
     private function ossUrl($url)
     {
         if (strpos($url, 'http:') === 0 || strpos($url, 'https:') === 0) {
+            $url = str_replace(env('PREVIEW_OSS_URL'), env('PREVIEW_OSS_URL_INTERNAL'), $url);
             return  $url;
         }
         if (env('PREVIEW_OSS_URL_INTERNAL')) {