diff --git a/lib/OpenCloud/ObjectStore/Resource/Container.php b/lib/OpenCloud/ObjectStore/Resource/Container.php index 474d9134b..de5cad1fc 100644 --- a/lib/OpenCloud/ObjectStore/Resource/Container.php +++ b/lib/OpenCloud/ObjectStore/Resource/Container.php @@ -453,9 +453,9 @@ public function uploadObject($name, $data, array $headers = array()) $response = $this->getClient()->put($url, $headers, $entityBody)->send(); return $this->dataObject() + ->setContent($entityBody) ->populateFromResponse($response) - ->setName($name) - ->setContent($entityBody); + ->setName($name); } /** @@ -524,9 +524,9 @@ public function uploadObjects(array $files, array $commonHeaders = array(), $ret $dataObjects = array(); foreach ($responses as $index => $response) { $dataObjects[] = $this->dataObject() + ->setContent($entities[$index]) ->populateFromResponse($response) - ->setName($files[$index]['name']) - ->setContent($entities[$index]); + ->setName($files[$index]['name']); } return $dataObjects; }