Skip to content

Commit 0eb541c

Browse files
committed
put policy add PersistentOps and PersistentNotifyUrl
1 parent 483d7ce commit 0eb541c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

qiniu/rs.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class Qiniu_RS_PutPolicy
4949
public $AsyncOps;
5050
public $EndUser;
5151
public $Expires;
52+
public $PersistentOps;
53+
public $PersistentNotifyUrl;
5254

5355
public function __construct($scope)
5456
{
@@ -82,6 +84,10 @@ public function Token($mac) // => $token
8284
if (!empty($this->EndUser)) {
8385
$policy['endUser'] = $this->EndUser;
8486
}
87+
if (!empty($this->PersistentOps) && !empty($this->PersistentNotifyUrl)) {
88+
$policy['persistentOps'] = $this->PersistentOps;
89+
$policy['persistentNotifyUrl'] = $this->PersistentNotifyUrl;
90+
}
8591

8692
$b = json_encode($policy);
8793
return Qiniu_SignWithData($mac, $b);

0 commit comments

Comments
 (0)