修改家庭档案接口
This commit is contained in:
+17
-7
@@ -92,10 +92,9 @@ class Oss
|
||||
try {
|
||||
$ossClient = $this->createClient();
|
||||
|
||||
$object = "applet/doctor/card/".$filename;
|
||||
$ossClient->putObject($this->config['bucket'], $object, $content);
|
||||
$ossClient->putObject($this->config['bucket'], $filename, $content);
|
||||
|
||||
return $object;
|
||||
return $filename;
|
||||
}catch(\Exception $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
@@ -112,10 +111,6 @@ class Oss
|
||||
{
|
||||
try {
|
||||
$ossClient = $this->createClient();
|
||||
|
||||
// 将图片缩放为固定宽高100 px后,再旋转90°。
|
||||
|
||||
|
||||
$options = array(
|
||||
OssClient::OSS_PROCESS => $style);
|
||||
|
||||
@@ -126,4 +121,19 @@ class Oss
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件到内存
|
||||
* @param string $filename
|
||||
* @param string $style
|
||||
* @return string
|
||||
*/
|
||||
public function getObjectToRAM(string $filename): string
|
||||
{
|
||||
try {
|
||||
$ossClient = $this->createClient();
|
||||
return $ossClient->getObject($this->config['bucket'], $filename);
|
||||
}catch(\Exception $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user