title: Rails 4, Paperclip, Amazon S3 Config Amazon Path
body: <p>I'm trying to configure the endpoint which is returned from paperclip when my object is successfully uploaded to Amazon's S3 service. The upload and everything is working correctly, but the URL that is being returned is incorrect for displaying the upload. </p>
  
  <p>Right now, the url that is being returned is <code>http://s3.amazonaws.com/path/to/my/items</code> (as seen in the picture below).</p>
  
  <p>Instead of <code>s3.amazonaws.com</code>, I would like the root to be specific to the bucket's location (e.g. <strong>s3-us-west-1.amazonaws.com/path/to/my/items</strong>)</p>
  
  <p><img src="https://i.stack.imgur.com/uHa0x.png" alt="enter image description here"></p>
  
  <p>Where should I try and configure a different url path (from s3.amazonaws.com to something else)? I've tried to add a url with the above path into my configuration file like:</p>
  
  <pre><code>  #Paperclip Amazon S3
    config.paperclip_defaults = {
        :storage =&gt; :s3,
        :url =&gt; "https://s3-us-west-1.amazonaws.com/",
        :s3_credentials =&gt; {
            :bucket =&gt; ENV['S3_BUCKET_NAME'],
            :access_key_id =&gt; ENV['AWS_ACCESS_KEY_ID'],
            :secret_access_key =&gt; ENV['AWS_SECRET_ACCESS_KEY']
  
        }
  
    }
  </code></pre>
  
  <p>Which did not appear to have any effect. Please advise on where I should be setting this option!</p>
  
  <p>Thanks in advance!</p>