作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

... ... @@ -500,6 +500,15 @@ if (!function_exists('getFileUrl')) {
$url[] = getFileUrl($v);
}
}else{
if(empty($path)){
return '';
}
if((strpos($path,'https://')!== false) || (strpos($path,'http://') !== false)){
return $path;
}
if(substr($path,0,2) == '//'){
return 'https:'.$path;
}
if($location == 1){
$cos = config('filesystems.disks.cos');
$cosCdn = $cos['cdn'];
... ...
... ... @@ -41,6 +41,8 @@ class BaseController extends Controller
$this->manage = $info;
Cache::put(Common::MANAGE_TOKEN . $this->token, $info, 3600 * 6);//更新缓存时间
$this->uid = $info['id'];
//写入操作记录
}
}
... ... @@ -124,4 +126,5 @@ class BaseController extends Controller
$response = response($result,$result_code,$this->header);
throw new HttpResponseException($response);
}
}
... ...
... ... @@ -114,9 +114,8 @@ class FileManageController extends BaseController
$hash = hash_file('md5', $file->getPathname());
$info = FileManage::where('hash', $hash)->first();
if($info){
$this->fail('文件已存在'.$hash);
$this->fail('文件已上传,文件名称.'.$info['name']);
}
return [
'size' => $size,
'extension' => $extension,
... ...