|
...
|
...
|
@@ -594,14 +594,21 @@ if (!function_exists('getFileUrl')) { |
|
|
|
if(substr($path,0,2) == '//'){
|
|
|
|
return 'https:'.$path;
|
|
|
|
}
|
|
|
|
$file_type = pathinfo($path, PATHINFO_EXTENSION);
|
|
|
|
$fileTypeArr = ['zip', 'pdf', 'mp4', 'doc', 'docx', 'm4v', 'xlsx'];
|
|
|
|
if(in_array(strtolower($file_type),$fileTypeArr)){
|
|
|
|
$cdn2 = config('filesystems.disks.cos')['cdn2'];
|
|
|
|
return $cdn2.$path;
|
|
|
|
}
|
|
|
|
if($location == 0){
|
|
|
|
//v6-file.globalso.com
|
|
|
|
$cos = config('filesystems.disks.cos');
|
|
|
|
$cosCdn = ($storage_type == 0) ? $cos['cdn'] : $cos['cdn1'];
|
|
|
|
$url = $cosCdn.$path;
|
|
|
|
return $cosCdn.$path;
|
|
|
|
}else{
|
|
|
|
$s3 = config('filesystems.disks.s3');
|
|
|
|
$cdn = $s3['cdn'];
|
|
|
|
$url = $cdn.$path;
|
|
|
|
return $cdn.$path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $url;
|
...
|
...
|
|