|
@@ -594,14 +594,21 @@ if (!function_exists('getFileUrl')) { |
|
@@ -594,14 +594,21 @@ if (!function_exists('getFileUrl')) { |
|
594
|
if(substr($path,0,2) == '//'){
|
594
|
if(substr($path,0,2) == '//'){
|
|
595
|
return 'https:'.$path;
|
595
|
return 'https:'.$path;
|
|
596
|
}
|
596
|
}
|
|
|
|
597
|
+ $file_type = pathinfo($path, PATHINFO_EXTENSION);
|
|
|
|
598
|
+ $fileTypeArr = ['zip', 'pdf', 'mp4', 'doc', 'docx', 'm4v', 'xlsx'];
|
|
|
|
599
|
+ if(in_array(strtolower($file_type),$fileTypeArr)){
|
|
|
|
600
|
+ $cdn2 = config('filesystems.disks.cos')['cdn2'];
|
|
|
|
601
|
+ return $cdn2.$path;
|
|
|
|
602
|
+ }
|
|
597
|
if($location == 0){
|
603
|
if($location == 0){
|
|
|
|
604
|
+ //v6-file.globalso.com
|
|
598
|
$cos = config('filesystems.disks.cos');
|
605
|
$cos = config('filesystems.disks.cos');
|
|
599
|
$cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1'];
|
606
|
$cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1'];
|
|
600
|
- $url = $cosCdn.$path;
|
607
|
+ return $cosCdn.$path;
|
|
601
|
}else{
|
608
|
}else{
|
|
602
|
$s3 = config('filesystems.disks.s3');
|
609
|
$s3 = config('filesystems.disks.s3');
|
|
603
|
$cdn = $s3['cdn'];
|
610
|
$cdn = $s3['cdn'];
|
|
604
|
- $url = $cdn.$path;
|
611
|
+ return $cdn.$path;
|
|
605
|
}
|
612
|
}
|
|
606
|
}
|
613
|
}
|
|
607
|
return $url;
|
614
|
return $url;
|