123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- require dirname(__FILE__, 2) . '/vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'scheme' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId,
- 'secretKey' => $secretKey)));
- try {
-
- $result = $cosClient->createFileUncompressJobs(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Tag' => 'FileUncompress',
- 'Input' => array(
- 'Object' => 'test.zip',
- ),
- 'Operation' => array(
- 'UserData' => 'xxx',
- 'FileUncompressConfig' => array(
- 'Prefix' => 'prefix',
- 'PrefixReplaced' => '1',
- ),
- 'Output' => array(
- 'Region' => $region,
- 'Bucket' => 'examplebucket-125000000',
- ),
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|