diff --git a/src/service/aliyun/OssService.php b/src/service/aliyun/OssService.php index a708739..cfb2b18 100644 --- a/src/service/aliyun/OssService.php +++ b/src/service/aliyun/OssService.php @@ -84,7 +84,7 @@ class OssService extends Service try { $ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint); $ossClient->uploadFile($this->bucket, $object, $filePath); - return $this->app->config->get('dtapp.aliyun.oss.url') . $filePath; + return $this->app->config->get('dtapp.aliyun.oss.url') . $object; } catch (OssException $e) { return $e->getMessage(); } diff --git a/src/service/baidu/BosService.php b/src/service/baidu/BosService.php index f5083f8..35dd422 100644 --- a/src/service/baidu/BosService.php +++ b/src/service/baidu/BosService.php @@ -93,6 +93,6 @@ class BosService extends Service // 从文件中直接上传Object if (empty($this->bucket)) $this->getConfig(); $client->putObjectFromFile($this->bucket, $object, $filePath); - return $this->app->config->get('dtapp.baidu.bos.url') . $filePath; + return $this->app->config->get('dtapp.baidu.bos.url') . $object; } } diff --git a/src/service/douyin/WatermarkService.php b/src/service/douyin/WatermarkService.php index 12f22b6..f8e313d 100644 --- a/src/service/douyin/WatermarkService.php +++ b/src/service/douyin/WatermarkService.php @@ -24,6 +24,7 @@ use DtApp\ThinkLibrary\service\baidu\BosService; use DtApp\ThinkLibrary\service\huaweicloud\ObsService; use DtApp\ThinkLibrary\service\StorageService; use DtApp\ThinkLibrary\service\tencent\CosService; +use Exception; use stdClass; /** @@ -192,6 +193,7 @@ class WatermarkService extends Service /** * 获取全部信息 * @return $this + * @throws Exception */ public function getAll() { diff --git a/src/service/huaweicloud/ObsService.php b/src/service/huaweicloud/ObsService.php index f7af5d5..8d691f4 100644 --- a/src/service/huaweicloud/ObsService.php +++ b/src/service/huaweicloud/ObsService.php @@ -92,7 +92,7 @@ class ObsService extends Service 'SourceFile' => $filePath // localfile为待上传的本地文件路径,需要指定到具体的文件名 ]); if (isset($resp['RequestId'])) { - return $this->app->config->get('dtapp.huaweicloud.obs.url') . $filePath; + return $this->app->config->get('dtapp.huaweicloud.obs.url') . $object; } else { return false; } diff --git a/src/service/tencent/CosService.php b/src/service/tencent/CosService.php index 31d3a69..6ca43c0 100644 --- a/src/service/tencent/CosService.php +++ b/src/service/tencent/CosService.php @@ -102,6 +102,6 @@ class CosService extends Service 'Body' => $file) ); } - return $this->app->config->get('dtapp.tencent.cos.url') . $filePath; + return $this->app->config->get('dtapp.tencent.cos.url') . $object; } }