When uploading new asset into the CloudFiles storage I want to get public URL of this asset (if container is CDN-enabled). I figured out the only way to do this is to issue 3 (yes, three!) requests to RackSpace:
x-auth-token, x-storage-url and x-cdn-management-url.x-cdn-management-url for public URL of the container.I just want to make sure that I really need 3 requests per upload to get the public URL of the asset I just uploaded. All the operations must be performed programmatically via API.
I believe that once you have your container's CDN URL, every object you put in it is appended to it. So, if your container's CDN URL is cdn1.foo.cloudstorage.com, your objects will have the URLs cdn1.foo.cloudstorage.com/object1.ext, cdn1.foo.cloudstorage.com/object2.ext, etc.
You only need the three steps to get the initial container CDN URL. Afterwards, it's simple.
If you're using Java, PHP, or Python, checkout one of the Rackspace SDKs. For examples on how to use CDN with each see:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With