Skip to content

Commit ad79916

Browse files
author
justinlguo
committed
update ZipFilePreview param
1 parent e16a25e commit ad79916

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

sample/ZipFilePreviewDemo.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@
1515
try {
1616
//该接口可以在不解压文件的情况下预览压缩包内的内容,包含文件数量、名称、文件时间等,接口为同步请求方式
1717
$result = $cosClient->ZipFilePreview(array(
18-
'Bucket' => '###bucketName###', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
19-
'ObjectKey' => 'undefined' // {ObjectKey}
20-
'Headers' => array(
21-
'Content-Type' => 'application/xml',
22-
),
23-
'ciProcess' => 'null', // 操作类型,压缩包预览计算固定为:zippreview
18+
'Bucket' => 'test-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
19+
'Key' => 'for-test.zip', // 文件名称
20+
'Headers' => array(
21+
'Content-Type' => 'application/xml',
22+
),
2423

2524
));
2625
// 请求成功
2726
print_r($result);
2827
} catch (\Exception $e) {
2928
// 请求失败
3029
echo($e);
31-
}
30+
}

src/Descriptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20278,7 +20278,7 @@ public static function UpdateFileMetaIndexOutput() {
2027820278
public static function ZipFilePreview() {
2027920279
return array(
2028020280
'httpMethod' => 'GET',
20281-
'uri' => '/{Bucket}{/Key*}?ci-process=',
20281+
'uri' => '/{Bucket}{/Key*}?ci-process=zippreview',
2028220282
'class' => 'Qcloud\\Cos\\Command',
2028320283
'responseClass' => 'ZipFilePreviewOutput',
2028420284
'responseType' => 'model',

0 commit comments

Comments
 (0)