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;