Skip to content

Instantly share code, notes, and snippets.

@jpilcher
jpilcher / Rackspace Container Upload
Last active August 29, 2015 14:20
Shows how to create a temporary url to upload a file directly to a Rackspace container.
//http://docs.php-opencloud.com/en/latest/index.html
$client = new Rackspace(
Rackspace::US_IDENTITY_ENDPOINT, array(
'username' => '{{username}}',
'apiKey' => '{{apiKey}}'
)
);
$objectStoreService = $client->objectStoreService(null, 'ORD', 'publicURL');
$container = $objectStoreService->getContainer('{{container_name}}');