Skip to content

Commit

Permalink
Merge pull request #13 from big-dream/master
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue authored Nov 20, 2023
2 parents 86de3c1 + 09531cf commit e210652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ObjectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function markUploadAsCompleted(string $key, string $uploadId, array $body
'query' => [
'uploadId' => $uploadId,
],
'body' => XML::fromArray($body),
'body' => XML::fromArray($body, 'CompleteMultipartUpload', 'Part'),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Support/XML.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public static function toArray(string $xml): array
return Transformer::toArray($xml);
}

public static function fromArray(array $data): bool|string
public static function fromArray(array $data, string $root = 'xml', string $item = 'item'): bool|string
{
if (empty($data)) {
return '';
}

return Transformer::toXml($data);
return Transformer::toXml($data, root: $root, item: $item);
}
}

0 comments on commit e210652

Please sign in to comment.