From c9c2ae40b8d9d50d705dd0c7aa8fd37f5561e119 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Tue, 9 Jul 2024 00:40:00 +0800 Subject: [PATCH] yh --- Application/Base/Service/GameSourceService.class.php | 5 ++++- Application/Base/Tool/CosClient.class.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 779cdd395..b8b3766de 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -424,7 +424,7 @@ class GameSourceService { 'timeout' => 30.0, ]); try { - $response = $client->post('/upload', [ + $response = $client->post('/upload/upload', [ 'verify' => false, 'form_params' => [ 'file' => $localFilePath, @@ -446,6 +446,9 @@ class GameSourceService { 'message' => '请求异常: ' . $e->getMessage(), ]; } + if ($result['code'] == '0000') { + $result['status'] = true; + } return $result; } diff --git a/Application/Base/Tool/CosClient.class.php b/Application/Base/Tool/CosClient.class.php index a729b5780..8efbe3484 100644 --- a/Application/Base/Tool/CosClient.class.php +++ b/Application/Base/Tool/CosClient.class.php @@ -3,7 +3,7 @@ namespace Base\Tool; use Base\Tool\StorageClient; use Exception; -use Qcloud\Cos\Client as BaseCosClient; +use \Qcloud\Cos\Client as BaseCosClient; /** * 腾讯云OBS