去除基廷成员验证

This commit is contained in:
2023-03-20 19:45:33 +08:00
parent 426e95a0fa
commit cf12f1f0ab
7 changed files with 229 additions and 57 deletions
+26
View File
@@ -100,4 +100,30 @@ class Oss
throw new BusinessException($e->getMessage());
}
}
/**
* 下载自定义风格文件到内存
* @param string $filename
* @param string $style
* @return string
*/
public function getCusTomObjectToRAM(string $filename,string $style = "image/resize"): string
{
try {
$ossClient = $this->createClient();
// 将图片缩放为固定宽高100 px后,再旋转90°。
$options = array(
OssClient::OSS_PROCESS => $style);
$object = $filename;
return $ossClient->getObject($this->config['bucket'], $object,$options);
}catch(\Exception $e) {
throw new BusinessException($e->getMessage());
}
}
}