1234567891011121314151617181920212223242526272829303132333435 |
- <?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->updateMediaSmartCoverTemplate(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Key' => '',
- 'Tag' => 'SmartCover',
- 'Name' => 'media-smartcover-name',
- 'SmartCover' => array(
- 'Format' => 'jpg',
- 'Width' => '1280',
- 'Height' => '960',
- 'Count' => '3',
- 'DeleteDuplicates' => 'true',
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|