From c18dfd00c281b6e3d1a5a7d1df4baa8a31213019 Mon Sep 17 00:00:00 2001 From: sun Date: Fri, 14 Aug 2015 10:58:20 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=81=E4=B9=85?= =?UTF-8?q?=E5=8C=96=E5=A4=84=E7=90=86=E4=B8=AD=E7=9A=84=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E9=98=9F=E5=88=97=E4=B8=8E=E5=9B=9E=E8=B0=83=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/QiniuAdapter.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/QiniuAdapter.php b/src/QiniuAdapter.php index 234f0eb9..79f7e9b8 100644 --- a/src/QiniuAdapter.php +++ b/src/QiniuAdapter.php @@ -23,17 +23,23 @@ class QiniuAdapter extends AbstractAdapter { private $bucket = null; private $domain = null; + private $pipeline = null; //新增qiniu持久处理时的私有队列 + private $notify_url = null; //持久化处理后的回调地址 + private $auth = null; private $upload_manager = null; private $bucket_manager = null; private $operation = null; - public function __construct($access_key, $secret_key, $bucket, $domain) + public function __construct($access_key, $secret_key, $bucket, $domain, $pipeline, $notify_url) { $this->access_key = $access_key; $this->secret_key = $secret_key; $this->bucket = $bucket; $this->domain = $domain; + $this->pipeline = $pipeline; + $this->notify_url = $notify_url; + $this->setPathPrefix('http://' . $this->domain); } @@ -399,7 +405,7 @@ public function persistentFop($path = null, $fops = null) { $auth = $this->getAuth(); - $pfop = New PersistentFop($auth, $this->bucket); + $pfop = New PersistentFop($auth, $this->bucket, $this->pipeline, $this->notify_url); list($id, $error) = $pfop->execute($path, $fops); From ab0c045e1a9780d202c0a3f39582ee247ea12d22 Mon Sep 17 00:00:00 2001 From: abcsun Date: Tue, 8 Sep 2015 08:48:47 +0800 Subject: [PATCH 2/6] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b04d0c04..240de2a1 100644 --- a/README.md +++ b/README.md @@ -104,4 +104,7 @@ ## 官方SDK / 手册 - https://github.com/qiniu/php-sdk - - http://developer.qiniu.com/docs/v6/sdk/php-sdk.html \ No newline at end of file + - http://developer.qiniu.com/docs/v6/sdk/php-sdk.html + +## 说明 +在原有基础上增加了对PIPE以及回调地址参数的配置 From c1c8b922c309c9da762075e5ffdbacbf428fd6ca Mon Sep 17 00:00:00 2001 From: abcsun Date: Tue, 8 Sep 2015 08:55:09 +0800 Subject: [PATCH 3/6] Update composer.json --- composer.json | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 57c260c4..ee76348e 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,21 @@ { - "name": "zgldh/qiniu-laravel-storage", + "name": "abcsun/qiniu-laravel-storage", "type": "library", "description": "Qiniu Resource (Cloud) Storage SDK for Laravel 5", "keywords": ["qiniu", "storage", "sdk", "cloud", "laravel"], "license": "MIT", "authors": [ { - "name": "zgldh", - "email": "zgldh@hotmail.com" - } + "name": "zgldh", + "email": "zgldh@hotmail.com", + "role": "Original Developer" + }, + { + "name": "abcsun", + "email": "chenglongsun_nj@163.com", + "role": "Developer", + "homepage": "http://github.com/abcsun" + } ], "require": { "php": ">=5.3.3", From 1e6bde9f63760657311e6dd1007115bfbd5955d9 Mon Sep 17 00:00:00 2001 From: abcsun Date: Tue, 8 Sep 2015 09:01:20 +0800 Subject: [PATCH 4/6] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ee76348e..25779578 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "abcsun/qiniu-laravel-storage", + "name": "abcsun/qiniu-laravel", "type": "library", "description": "Qiniu Resource (Cloud) Storage SDK for Laravel 5", "keywords": ["qiniu", "storage", "sdk", "cloud", "laravel"], From d3df9faebc365167fabe9b03af1bb84f125aee88 Mon Sep 17 00:00:00 2001 From: sun Date: Tue, 15 Sep 2015 16:23:21 +0800 Subject: [PATCH 5/6] add config --- src/QiniuFilesystemServiceProvider.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/QiniuFilesystemServiceProvider.php b/src/QiniuFilesystemServiceProvider.php index 9e9dc31a..f7e2a219 100644 --- a/src/QiniuFilesystemServiceProvider.php +++ b/src/QiniuFilesystemServiceProvider.php @@ -23,7 +23,9 @@ function ($app, $config) $config['access_key'], $config['secret_key'], $config['bucket'], - $config['domain'] + $config['domain'], + $config['pipeline'], + $config['notify_url'] ); $file_system = new Filesystem($qiniu_adapter); $file_system->addPlugin(new PrivateDownloadUrl()); @@ -44,4 +46,4 @@ public function register() { // } -} \ No newline at end of file +} From f146b1e8ce14cd847af94cf66ae35f898775f990 Mon Sep 17 00:00:00 2001 From: abcsun Date: Wed, 16 Sep 2015 09:16:38 +0800 Subject: [PATCH 6/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 240de2a1..c9233501 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ 'access_key' => '', //AccessKey 'secret_key' => '', //SecretKey 'bucket' => '', //Bucket名字 + 'pipeline' => '', //pipeline名字 + 'notify_url' => '', //持久化处理回调地址 ], ],