Skip to content

Commit 543c958

Browse files
lewzylulewzylu
andauthored
fix bug of list parts (#142)
Co-authored-by: lewzylu <[email protected]>
1 parent 2e4b89a commit 543c958

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Qcloud/Cos/Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4243,7 +4243,7 @@ public static function getService() {
42434243
'Parts' => array(
42444244
'type' => 'array',
42454245
'location' => 'xml',
4246-
'sentAs' => 'Parts',
4246+
'sentAs' => 'Part',
42474247
'data' => array(
42484248
'xmlFlattened' => true
42494249
),

src/Qcloud/Cos/Tests/Test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,10 @@ public function testResumeUpload() {
11321132
'Body' => substr($body, 0, $partSize),
11331133
'UploadId' => $uploadId,
11341134
'PartNumber' => 1]);
1135+
$rt = $this->cosClient->ListParts(['Bucket' => $this->bucket,
1136+
'Key' => $key,
1137+
'UploadId' => $uploadId]);
1138+
$this->assertEquals(count($rt['Parts']), 1);
11351139
$this->cosClient->resumeUpload($bucket=$this->bucket,
11361140
$key=$key,
11371141
$body=$body,

0 commit comments

Comments
 (0)