title: How to store files on amazon S3 conditionally based on what environment you are in
body: <p>I'm using Paperclip, and this code, along with the <code>aws-s3</code> gem, allows me to store file uploads with Amazon S3:</p>
  
  <pre><code>has_attached_file :photo,
    :styles =&gt; {
      :tiny =&gt; "25x25#",
      :shown =&gt; "40x40#",
      :thumbnail =&gt; "50x50#",
      :small  =&gt; "150x150&gt;",
      :medium =&gt; "300x300&gt;" },
      :default_url =&gt; "/images/default_:style.jpg",
      :storage =&gt; :s3, 
      :s3_credentials =&gt; "#{RAILS_ROOT}/config/s3.yml",
      :path =&gt; "profile/:attachment/:style/:id.:extension"
  </code></pre>
  
  <p>However I do not want to store files on Amazon S3 when I am in my development environment. How do I set that in my application?</p>