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.