rackspace / php-opencloud

The PHP SDK for OpenStack clouds
developer.rackspace.com
Other
451 stars 249 forks source link

Container::UploadObject() not returning Etag and ContentType #683

Open evach-vf opened 8 years ago

evach-vf commented 8 years ago

When uploading an object using Container::UploadObject(), the returned object doesn't have their Etag and ContentType set, they're both NULL.

On success, both values should be set and returned.

Example code:

// Upload an object to the container.
$localFileName  = __DIR__ . '/php-elephant.jpg';
$remoteFileName = 'php-elephant.jpg';

$handle = fopen($localFileName, 'r');
$object = $container->uploadObject($remoteFileName, $handle);

The same thing also occurs with Container::UploadObjects()