-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(*):添加新特性,修复bug - 视频截帧,视频信息查询,put/get bucket referer - CRC添加 - 修复默认分块过大导致上传失败的问题 - 修复图片鉴定ci-process param出现两次的bug - 依赖更新 - action添加
- Loading branch information
Showing
23 changed files
with
1,214 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml export-ignore | ||
/src/Qcloud/Cos/Tests export-ignore | ||
/bin export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: PHP 5.6 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:5.6 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer install | ||
- name: Test | ||
run: for i in `ls src/Qcloud/Cos/*.php`; do php -l $i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: PHP 7.1 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:7.1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer install | ||
composer require --dev phpunit/phpunit | ||
./vendor/bin/phpunit | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: PHP 7.2 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:7.2 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
pecl install xdebug | ||
docker-php-ext-enable xdebug | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer install | ||
composer require --dev phpunit/phpunit | ||
XDEBUG_MODE=coverage ./vendor/bin/phpunit | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: PHP 7.3 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:7.3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
pecl install xdebug | ||
docker-php-ext-enable xdebug | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer install | ||
composer require --dev phpunit/phpunit | ||
XDEBUG_MODE=coverage ./vendor/bin/phpunit | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: PHP 7.4 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:7.4 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
pecl install xdebug | ||
docker-php-ext-enable xdebug | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer require --dev phpunit/phpunit | ||
- name: Test | ||
run: | | ||
XDEBUG_MODE=coverage ./vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: PHP 8.0 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
COS_REGION: ${{ secrets.COS_REGION }} | ||
COS_APPID: ${{ secrets.COS_APPID }} | ||
COS_SECRET: ${{ secrets.COS_SECRET }} | ||
COS_KEY: ${{ secrets.COS_KEY }} | ||
COS_BUCKET: ${{ secrets.COS_BUCKET }} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:8.0 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
apt update | ||
apt install -y libzip-dev unzip | ||
docker-php-ext-install zip | ||
pecl install xdebug | ||
docker-php-ext-enable xdebug | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
composer require --dev phpunit/phpunit | ||
- name: Test | ||
run: | | ||
XDEBUG_MODE=coverage ./vendor/bin/phpunit | ||
- name: codecov | ||
uses: codecov/codecov-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ composer.lock | |
vendor/ | ||
*.DS_Store | ||
index.php | ||
clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
require dirname(__FILE__) . '/../vendor/autoload.php'; | ||
|
||
$secretId = "SECRETID"; //"云 API 密钥 SecretId"; | ||
$secretKey = "SECRETKEY"; //"云 API 密钥 SecretKey"; | ||
$region = "ap-beijing"; //设置一个默认的存储桶地域 | ||
$cosClient = new Qcloud\Cos\Client( | ||
array( | ||
'region' => $region, | ||
'schema' => 'https', //协议头部,默认为http | ||
'credentials' => array( | ||
'secretId' => $secretId, | ||
'secretKey' => $secretKey))); | ||
try { | ||
$result = $cosClient->getBucketReferer(array( | ||
'Bucket' => 'examplebucket-125000000' //格式:BucketName-APPID | ||
) | ||
); | ||
// 请求成功 | ||
echo($result); | ||
} catch (\Exception $e) { | ||
// 请求失败 | ||
echo($e); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
require dirname(__FILE__) . '/../vendor/autoload.php'; | ||
|
||
$secretId = "SECRETID"; //"云 API 密钥 SecretId"; | ||
$secretKey = "SECRETKEY"; //"云 API 密钥 SecretKey"; | ||
$region = "ap-beijing"; //设置一个默认的存储桶地域 | ||
$cosClient = new Qcloud\Cos\Client( | ||
array( | ||
'region' => $region, | ||
'schema' => 'https', //协议头部,默认为http | ||
'credentials'=> array( | ||
'secretId' => $secretId , | ||
'secretKey' => $secretKey))); | ||
|
||
try { | ||
$result = $cosClient->GetMediaInfo( | ||
array( | ||
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID | ||
'Key' =>'exampleobject', //桶中的媒体文件,如test.mp4 | ||
'ci-process' => 'videoinfo' //操作类型,固定使用 videoinfo | ||
) | ||
); | ||
// 请求成功 | ||
echo($result); | ||
} catch (\Exception $e) { | ||
// 请求失败 | ||
echo($e); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.