You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the flysystem-rackspace plugin to handle our file access abstraction, and just came across this (I'll try and send a PR tonight to fix though I'm not sure what the correct resolution should be)
$oOpenstack = new \OpenCloud\OpenStack(
// Config
);
$oStore = $oOpenstack->objectStoreService($sServiceName, 'RegionOne');
// Allows trailing slash here$container = $oStore->getContainer('test_container/');
$container->uploadObject('object-name', 'test');
$dataObject = $container->dataObject('object-name');
// flysystem-rackspace does this in the copy$destination = '/'.$container->getName().'/newname/';
$response = $dataObject->copy($destination);
foreach($container->objectList() as$object)
{
// The object name is now "/newname"// But this delete hits /test_container/newname instead of /test_container//newname$object->delete();
}
I imagine this breaks other things as well, but that's the first one I found.
The text was updated successfully, but these errors were encountered:
If my object name begins with a slash (maybe I'm crazy, or I've made a mistake when specifying the object name) I can't delete it even if the container name doesn't have a trailing slash
$oOpenstack = new \OpenCloud\OpenStack(
// Config
);
$oStore = $oOpenstack->objectStoreService($sServiceName, 'RegionOne');
// Allows trailing slash here$container = $oStore->getContainer('test_container/');
$container->uploadObject('object-name', 'test');
$dataObject = $container->dataObject('object-name');
// flysystem-rackspace does this in the copy$destination = '/'.$container->getName().'//newname';
$response = $dataObject->copy($destination);
foreach($container->objectList() as$object)
{
// The object name is now "/newname"// But this delete hits /test_container/newname instead of /test_container//newname$object->delete();
}
I think getUrl needs to urlencode the object name instead (otherwise the url won't include that initial slash).
Arguably the user shouldn't do this, but I managed it...
I've been using the flysystem-rackspace plugin to handle our file access abstraction, and just came across this (I'll try and send a PR tonight to fix though I'm not sure what the correct resolution should be)
I imagine this breaks other things as well, but that's the first one I found.
The text was updated successfully, but these errors were encountered: