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:
- Authenticate user and get
x-auth-token
,x-storage-url
andx-cdn-management-url
. - After getting all the tokens and URLs, upload a file to the container.
- Issue a HEAD request to the
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.