Skip to content

Commit 51070d9

Browse files
committed
fix:fix createBucket and updateBucketEvent function
1 parent df900ae commit 51070d9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Qiniu/Storage/BucketManager.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function listbuckets(
7474
*/
7575
public function createBucket($name, $region = 'z0')
7676
{
77-
$path = '/mkbucketv2/'.$name.'/region/' . $region;
77+
$path = '/mkbucketv3/'.$name.'/region/' . $region;
7878
return $this->rsPost($path, null);
7979
}
8080

@@ -464,6 +464,13 @@ public function updateBucketEvent(
464464
$params['host'] = $host;
465465
}
466466
$data = http_build_query($params);
467+
if ($event) {
468+
$eventpath = "";
469+
foreach ($event as $key => $value) {
470+
$eventpath .= "&event=$value";
471+
}
472+
$data .= $eventpath;
473+
}
467474
$info = $this->ucPost($path, $data);
468475
return $info;
469476
}

0 commit comments

Comments
 (0)