title: How do I return Cloudfront url after S3 upload?
body: <p>I'm uploading a file to an S3 bucket for which I've created a Cloudfront distribution. I'm using the <code>Aws\S3\S3Client</code> class.</p>
  
  <p>After uploading with <code>putObject</code>, the response object and the <code>getObjectUrl</code> method both return the object's url as <a href="https://s3-eu-west-1.amazonaws.com/mybucket/path/myfile.jpg" rel="nofollow">https://s3-eu-west-1.amazonaws.com/mybucket/path/myfile.jpg</a>. I am trying to get the Cloudfront url which would be something like <a href="https://d111111111ck.cloudfront.net/path/myfile.jpg" rel="nofollow">https://d111111111ck.cloudfront.net/path/myfile.jpg</a>. </p>
  
  <p>Is there any way to get this url directly, or do I have to build it from my distribution hostname and file path?</p>