Skip to content

Commit 1b2abe2

Browse files
committed
Merge pull request #78 from longbai/add_5.5_rm_5.2
travis add 5.5
2 parents 1e91070 + 141eabb commit 1b2abe2

File tree

4 files changed

+1
-30
lines changed

4 files changed

+1
-30
lines changed

docs/README.gist.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,6 @@ SDK源码地址:<https://github.com/qiniu/php-sdk/tags>
316316
public $DetectMime; // 可选。如果设为非0值,则忽略上传端传递的文件MimeType信息,使用七牛服务器侦测内容后的判断结果。
317317
public $FsizeLimit; // 可选。int类型,超过限制大小的上传内容会被判为上传失败,返回413状态码。
318318
public $SaveKey; // 可选。自定义资源名格式。
319-
public $Transform; // 可选。指定资源经过怎样的处理后再保存。
320-
public $FopTimeout; // 可选。int类型,指定transform的超时时间,如果文件处理超过此值,则认为上传失败。
321319
public $MimeLimit; // 可选。限定上传的文件类型。
322320
}
323321

docs/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,6 @@ if ($err !== null) {
409409
public $DetectMime; // 可选。如果设为非0值,则忽略上传端传递的文件MimeType信息,使用七牛服务器侦测内容后的判断结果。
410410
public $FsizeLimit; // 可选。int类型,超过限制大小的上传内容会被判为上传失败,返回413状态码。
411411
public $SaveKey; // 可选。自定义资源名格式。
412-
public $Transform; // 可选。指定资源经过怎样的处理后再保存。
413-
public $FopTimeout; // 可选。int类型,指定transform的超时时间,如果文件处理超过此值,则认为上传失败。
414412
public $MimeLimit; // 可选。限定上传的文件类型。
415413
}
416414

qiniu/rs.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class Qiniu_RS_PutPolicy
5555
public $SaveKey;
5656
public $PersistentOps;
5757
public $PersistentNotifyUrl;
58-
public $Transform;
5958
public $FopTimeout;
6059
public $MimeLimit;
6160

@@ -109,9 +108,6 @@ public function Token($mac) // => $token
109108
if (!empty($this->PersistentNotifyUrl)) {
110109
$policy['persistentNotifyUrl'] = $this->PersistentNotifyUrl;
111110
}
112-
if (!empty($this->Transform)) {
113-
$policy['transform'] = $this->Transform;
114-
}
115111
if (!empty($this->FopTimeout)) {
116112
$policy['fopTimeout'] = $this->FopTimeout;
117113
}

tests/IoTest.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ public function testPut_mimetype() {
132132
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
133133
}
134134

135-
public function testPut_exclusive()
136-
{
135+
public function testPut_exclusive() {
137136
$key = 'testPut_exclusive' . getTid();
138137
$scope = $this->bucket . ':' . $key;
139138
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
@@ -157,27 +156,7 @@ public function testPut_exclusive()
157156
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
158157
$this->assertNull($err);
159158
}
160-
public function testPut_transform() {
161-
$key = 'testPut_transform' . getTid();
162-
$scope = $this->bucket . ':' . $key;
163-
$err = Qiniu_RS_Delete($this->client, $this->bucket, $key);
164159

165-
$putPolicy = new Qiniu_RS_PutPolicy($scope);
166-
$putPolicy->Transform = "imageMogr2/format/png";
167-
$putPolicy->ReturnBody = '{"key": $(key), "hash": $(etag), "mimeType":$(mimeType)}';
168-
$upToken = $putPolicy->Token(null);
169-
170-
list($ret, $err) = Qiniu_PutFile($upToken, $key, __file__, null);
171-
$this->assertNull($ret);
172-
$this->assertEquals($err->Err, "fop fail or timeout");
173-
var_dump($err);
174-
175-
$pic_path = "../docs/gist/logo.jpg";
176-
list($ret, $err) = Qiniu_PutFile($upToken, $key, $pic_path, null);
177-
$this->assertNull($err);
178-
$this->assertEquals($ret["mimeType"], "image/png");
179-
var_dump($ret);
180-
}
181160
public function testPut_mimeLimit() {
182161
$key = 'testPut_mimeLimit' . getTid();
183162
$scope = $this->bucket . ':' . $key;

0 commit comments

Comments
 (0)