From ba21074b134f4306143000471057658ac77b826e Mon Sep 17 00:00:00 2001 From: nic12347 Date: Fri, 8 Nov 2024 17:06:03 +0800 Subject: [PATCH] Pic add 1105 (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ImageSlim * 文件解压参数补充 --------- Co-authored-by: franktguo --- sample/createFileUncompressJobs.php | 4 ++- sample/getFileUncompressResult.php | 2 +- src/Descriptions.php | 26 ++++++++++++++++++++ src/ImageParamTemplate/ImageSlimTemplate.php | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sample/createFileUncompressJobs.php b/sample/createFileUncompressJobs.php index d84f880..dfbce60 100644 --- a/sample/createFileUncompressJobs.php +++ b/sample/createFileUncompressJobs.php @@ -13,7 +13,7 @@ 'secretId' => $secretId, 'secretKey' => $secretKey))); try { - // https://cloud.tencent.com/document/product/436/83110 提交文件解压任务-异步 + // 提交文件解压任务-异步 $result = $cosClient->createFileUncompressJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'FileUncompress', @@ -25,6 +25,8 @@ 'FileUncompressConfig' => array( 'Prefix' => 'prefix', 'PrefixReplaced' => '1', +// 'UnCompressKey' => base64_encode('解压密钥'), // 解压密钥,传入时需先经过 base64编码 +// 'ListingFile' => false, // 指定查询任务或查看任务回调时,是否输出已解压的文件列表 ), 'Output' => array( 'Region' => $region, diff --git a/sample/getFileUncompressResult.php b/sample/getFileUncompressResult.php index 361487c..2642339 100644 --- a/sample/getFileUncompressResult.php +++ b/sample/getFileUncompressResult.php @@ -13,7 +13,7 @@ 'secretId' => $secretId, 'secretKey' => $secretKey))); try { - // https://cloud.tencent.com/document/product/436/83111 查询文件解压结果 + // 查询文件解压结果 $result = $cosClient->getFileUncompressResult(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Key' => '', // jobId diff --git a/src/Descriptions.php b/src/Descriptions.php index ca93bca..00fdd6a 100644 --- a/src/Descriptions.php +++ b/src/Descriptions.php @@ -13905,6 +13905,8 @@ public static function CreateFileUncompressJobs() { 'properties' => array( 'Prefix' => array( 'type' => 'string', 'location' => 'xml', ), 'PrefixReplaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'UnCompressKey' => array( 'type' => 'string', 'location' => 'xml', ), + 'ListingFile' => array( 'type' => 'boolean', 'location' => 'xml', 'format' => 'boolean-string',), ), ), 'Output' => array( @@ -14061,6 +14063,7 @@ public static function GetFileUncompressResultOutput() { 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Progress' => array( 'type' => 'integer', 'location' => 'xml', ), 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), @@ -14085,6 +14088,7 @@ public static function GetFileUncompressResultOutput() { 'properties' => array( 'Region' => array( 'type' => 'string', 'location' => 'xml', ), 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'FileUncompressConfig' => array( @@ -14093,6 +14097,8 @@ public static function GetFileUncompressResultOutput() { 'properties' => array( 'Prefix' => array( 'type' => 'string', 'location' => 'xml', ), 'PrefixReplaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'UnCompressKey' => array( 'type' => 'string', 'location' => 'xml', ), + 'ListingFile' => array( 'type' => 'boolean', 'location' => 'xml', ), ), ), 'FileUncompressResult' => array( @@ -14102,6 +14108,26 @@ public static function GetFileUncompressResultOutput() { 'Region' => array( 'type' => 'string', 'location' => 'xml', ), 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), 'FileCount' => array( 'type' => 'string', 'location' => 'xml', ), + 'FileList' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'IsTruncated' => array( 'type' => 'boolean', 'location' => 'xml', ), + 'Contents' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Key' => array( 'type' => 'string', 'location' => 'xml', ), + 'LastModified' => array( 'type' => 'string', 'location' => 'xml', ), + 'FileSize' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + ), + ), + ), ), ), ), diff --git a/src/ImageParamTemplate/ImageSlimTemplate.php b/src/ImageParamTemplate/ImageSlimTemplate.php index d9da4af..b23eed7 100644 --- a/src/ImageParamTemplate/ImageSlimTemplate.php +++ b/src/ImageParamTemplate/ImageSlimTemplate.php @@ -5,4 +5,4 @@ class ImageSlimTemplate extends ImageTemplate { public function queryString() { return "imageSlim"; } -} +} \ No newline at end of file