Commit 4dfc4745bd768514a564f80080c9ce6da502b1b5
1 parent
e76139ac
Exists in
master
and in
1 other branch
changed s3.yml to use config vars
Showing
1 changed file
with
14 additions
and
6 deletions
Show diff stats
config/s3.yml
| 1 | -# has_attached_file :avatar, | |
| 2 | -# :styles => { :thumbnail => "150x150" }, | |
| 3 | -# :path => ":attachment/:id/:style.:extension", | |
| 4 | -# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", | |
| 1 | +# Use Heroku's config vars to get your S3 account keys into the cloud: | |
| 2 | + | |
| 3 | +# heroku config:add S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190 | |
| 4 | + | |
| 5 | +# They are then automatically picked up by this file. | |
| 5 | 6 | |
| 6 | 7 | development: &default |
| 7 | - access_key_id: CHANGEME | |
| 8 | - secret_access_key: CHANGEME | |
| 8 | + access_key_id: <%= ENV['S3_KEY'] %> | |
| 9 | + secret_access_key: <%= ENV['S3_SECRET'] %> | |
| 9 | 10 | bucket: CHANGME_development |
| 10 | 11 | |
| 11 | 12 | test: |
| ... | ... | @@ -16,3 +17,10 @@ production: |
| 16 | 17 | <<: *default |
| 17 | 18 | bucket: CHANGME_production |
| 18 | 19 | |
| 20 | +# Use S3 with Paperclip using the following example as your guide. | |
| 21 | + | |
| 22 | +# has_attached_file :avatar, | |
| 23 | +# :styles => { :thumbnail => "150x150" }, | |
| 24 | +# :path => ":attachment/:id/:style.:extension", | |
| 25 | +# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", | |
| 26 | + | ... | ... |