Skip to content

Commit

Permalink
update ZipFilePreview param
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlguo committed Jul 29, 2024
1 parent e16a25e commit ad79916
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions sample/ZipFilePreviewDemo.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
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',
),

));
// 请求成功
print_r($result);
} catch (\Exception $e) {
// 请求失败
echo($e);
}
}
2 changes: 1 addition & 1 deletion src/Descriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ad79916

Please sign in to comment.