作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !3298
... ... @@ -1651,7 +1651,7 @@ if (!function_exists('httpGetSsl')) {
*/
function outMessage($filename = 'lyh_info',$message = '')
{
@file_put_contents(storage_path('logs/'.$filename.'.log'), "上传失败: " . $message . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/'.$filename.'.log'), "错误信息: " . $message . PHP_EOL, FILE_APPEND);
return true;
}
}
... ...
... ... @@ -364,7 +364,7 @@ class ImageController extends Controller
$res = $amazonS3Service->uploadFiles($file,$this->path,$fileName);
}
if($res === false){
outMessage('upload_images','文件上传失败'.$name);
outMessage('upload_images','图片上传失败'.$name);
continue;
}
$this->synchronizationImage($fileName,$this->upload_location);
... ... @@ -707,6 +707,9 @@ class ImageController extends Controller
$info = $imageSetting->read(['project_id'=>$this->cache['project_id']]);
$domain = 'http://globalso-v6-1309677403.cos.ap-hongkong.myqcloud.com';//cos域名
if($is_image){
if(empty($data['image'])){
$this->response('开启图片水印需要先关闭水印功能,重新上传水印图片'.Code::SYSTEM_ERROR);
}
$param = [
'image/'.$domain.($data['image'] ?? ''),//图片
'gravity/'.($data['gravity'] ?? 'SouthEast'),
... ...