From ad79916c01464dc2ce3eb3768b4b05f35972994a Mon Sep 17 00:00:00 2001 From: justinlguo Date: Mon, 29 Jul 2024 21:59:50 +0800 Subject: [PATCH] update ZipFilePreview param --- sample/ZipFilePreviewDemo.php | 13 ++++++------- src/Descriptions.php | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sample/ZipFilePreviewDemo.php b/sample/ZipFilePreviewDemo.php index a9546fc..7c539e1 100644 --- a/sample/ZipFilePreviewDemo.php +++ b/sample/ZipFilePreviewDemo.php @@ -15,12 +15,11 @@ try { //该接口可以在不解压文件的情况下预览压缩包内的内容,包含文件数量、名称、文件时间等,接口为同步请求方式 $result = $cosClient->ZipFilePreview(array( - 'Bucket' => '###bucketName###', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket - 'ObjectKey' => 'undefined' // {ObjectKey} - 'Headers' => array( - 'Content-Type' => 'application/xml', - ), - 'ciProcess' => 'null', // 操作类型,压缩包预览计算固定为:zippreview + 'Bucket' => 'test-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => 'for-test.zip', // 文件名称 + 'Headers' => array( + 'Content-Type' => 'application/xml', + ), )); // 请求成功 @@ -28,4 +27,4 @@ } catch (\Exception $e) { // 请求失败 echo($e); -} +} \ No newline at end of file diff --git a/src/Descriptions.php b/src/Descriptions.php index 16ab14a..a7c8504 100644 --- a/src/Descriptions.php +++ b/src/Descriptions.php @@ -20278,7 +20278,7 @@ public static function UpdateFileMetaIndexOutput() { public static function ZipFilePreview() { return array( 'httpMethod' => 'GET', - 'uri' => '/{Bucket}{/Key*}?ci-process=', + 'uri' => '/{Bucket}{/Key*}?ci-process=zippreview', 'class' => 'Qcloud\\Cos\\Command', 'responseClass' => 'ZipFilePreviewOutput', 'responseType' => 'model',