File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 15
15
try {
16
16
//该接口可以在不解压文件的情况下预览压缩包内的内容,包含文件数量、名称、文件时间等,接口为同步请求方式
17
17
$ 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
+ ),
24
23
25
24
));
26
25
// 请求成功
27
26
print_r ($ result );
28
27
} catch (\Exception $ e ) {
29
28
// 请求失败
30
29
echo ($ e );
31
- }
30
+ }
Original file line number Diff line number Diff line change @@ -20278,7 +20278,7 @@ public static function UpdateFileMetaIndexOutput() {
20278
20278
public static function ZipFilePreview() {
20279
20279
return array(
20280
20280
'httpMethod' => 'GET',
20281
- 'uri' => '/{Bucket}{/Key*}?ci-process=',
20281
+ 'uri' => '/{Bucket}{/Key*}?ci-process=zippreview ',
20282
20282
'class' => 'Qcloud\\Cos\\Command',
20283
20283
'responseClass' => 'ZipFilePreviewOutput',
20284
20284
'responseType' => 'model',
You can’t perform that action at this time.
0 commit comments