From 1928da223b0fe90721b9f004f3e20e028f31ac81 Mon Sep 17 00:00:00 2001 From: longbai Date: Fri, 23 May 2014 18:53:48 +0800 Subject: [PATCH 1/4] travis remove 5.2, add 5.5 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 399de88c..a297decf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: php php: - - 5.2 - 5.3 - 5.4 + - 5.5 before_script: - export QINIU_ACCESS_KEY="Vhiv6a22kVN_zhtetbPNeG9sY3JUL1HG597EmBwQ" - export QINIU_SECRET_KEY="b5b5vNg5nnkwkPfW5ayicPE_pj6hqgKMQEaWQ6JD" From 45df7a3fbc71a45ae8ae6cb0e98efb6e9bd20078 Mon Sep 17 00:00:00 2001 From: longbai Date: Fri, 23 May 2014 18:59:15 +0800 Subject: [PATCH 2/4] recover 5.2 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a297decf..415177f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: php php: + - 5.2 - 5.3 - 5.4 - 5.5 From c0552832e61e50b461aff7d36e684528ad7401ab Mon Sep 17 00:00:00 2001 From: longbai Date: Fri, 23 May 2014 19:15:34 +0800 Subject: [PATCH 3/4] remove transform --- docs/README.gist.md | 2 -- docs/README.md | 2 -- qiniu/rs.php | 4 ---- tests/IoTest.php | 23 +---------------------- 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/docs/README.gist.md b/docs/README.gist.md index 5a2b15c7..dc582fac 100644 --- a/docs/README.gist.md +++ b/docs/README.gist.md @@ -316,8 +316,6 @@ SDK源码地址: public $DetectMime; // 可选。如果设为非0值,则忽略上传端传递的文件MimeType信息,使用七牛服务器侦测内容后的判断结果。 public $FsizeLimit; // 可选。int类型,超过限制大小的上传内容会被判为上传失败,返回413状态码。 public $SaveKey; // 可选。自定义资源名格式。 - public $Transform; // 可选。指定资源经过怎样的处理后再保存。 - public $FopTimeout; // 可选。int类型,指定transform的超时时间,如果文件处理超过此值,则认为上传失败。 public $MimeLimit; // 可选。限定上传的文件类型。 } diff --git a/docs/README.md b/docs/README.md index e8292767..1a1c8217 100644 --- a/docs/README.md +++ b/docs/README.md @@ -409,8 +409,6 @@ if ($err !== null) { public $DetectMime; // 可选。如果设为非0值,则忽略上传端传递的文件MimeType信息,使用七牛服务器侦测内容后的判断结果。 public $FsizeLimit; // 可选。int类型,超过限制大小的上传内容会被判为上传失败,返回413状态码。 public $SaveKey; // 可选。自定义资源名格式。 - public $Transform; // 可选。指定资源经过怎样的处理后再保存。 - public $FopTimeout; // 可选。int类型,指定transform的超时时间,如果文件处理超过此值,则认为上传失败。 public $MimeLimit; // 可选。限定上传的文件类型。 } diff --git a/qiniu/rs.php b/qiniu/rs.php index d2a94125..425ba8f3 100644 --- a/qiniu/rs.php +++ b/qiniu/rs.php @@ -55,7 +55,6 @@ class Qiniu_RS_PutPolicy public $SaveKey; public $PersistentOps; public $PersistentNotifyUrl; - public $Transform; public $FopTimeout; public $MimeLimit; @@ -109,9 +108,6 @@ public function Token($mac) // => $token if (!empty($this->PersistentNotifyUrl)) { $policy['persistentNotifyUrl'] = $this->PersistentNotifyUrl; } - if (!empty($this->Transform)) { - $policy['transform'] = $this->Transform; - } if (!empty($this->FopTimeout)) { $policy['fopTimeout'] = $this->FopTimeout; } diff --git a/tests/IoTest.php b/tests/IoTest.php index 746f1aca..089b65de 100644 --- a/tests/IoTest.php +++ b/tests/IoTest.php @@ -132,8 +132,7 @@ public function testPut_mimetype() { $err = Qiniu_RS_Delete($this->client, $this->bucket, $key); } - public function testPut_exclusive() - { + public function testPut_exclusive() { $key = 'testPut_exclusive' . getTid(); $scope = $this->bucket . ':' . $key; $err = Qiniu_RS_Delete($this->client, $this->bucket, $key); @@ -157,27 +156,7 @@ public function testPut_exclusive() $err = Qiniu_RS_Delete($this->client, $this->bucket, $key); $this->assertNull($err); } - public function testPut_transform() { - $key = 'testPut_transform' . getTid(); - $scope = $this->bucket . ':' . $key; - $err = Qiniu_RS_Delete($this->client, $this->bucket, $key); - $putPolicy = new Qiniu_RS_PutPolicy($scope); - $putPolicy->Transform = "imageMogr2/format/png"; - $putPolicy->ReturnBody = '{"key": $(key), "hash": $(etag), "mimeType":$(mimeType)}'; - $upToken = $putPolicy->Token(null); - - list($ret, $err) = Qiniu_PutFile($upToken, $key, __file__, null); - $this->assertNull($ret); - $this->assertEquals($err->Err, "fop fail or timeout"); - var_dump($err); - - $pic_path = "../docs/gist/logo.jpg"; - list($ret, $err) = Qiniu_PutFile($upToken, $key, $pic_path, null); - $this->assertNull($err); - $this->assertEquals($ret["mimeType"], "image/png"); - var_dump($ret); - } public function testPut_mimeLimit() { $key = 'testPut_mimeLimit' . getTid(); $scope = $this->bucket . ':' . $key; From 141eabbc23cd92467649d877a4ca86dfb47a79a3 Mon Sep 17 00:00:00 2001 From: longbai Date: Fri, 23 May 2014 19:52:08 +0800 Subject: [PATCH 4/4] remove 5.5 support --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 415177f6..399de88c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ php: - 5.2 - 5.3 - 5.4 - - 5.5 before_script: - export QINIU_ACCESS_KEY="Vhiv6a22kVN_zhtetbPNeG9sY3JUL1HG597EmBwQ" - export QINIU_SECRET_KEY="b5b5vNg5nnkwkPfW5ayicPE_pj6hqgKMQEaWQ6JD"