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 1515try {
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+ }
Original file line number Diff line number Diff 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',
You can’t perform that action at this time.
0 commit comments