Skip to content

Instantly share code, notes, and snippets.

@pierangelo1982
Created December 12, 2015 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pierangelo1982/9fda7097cf6bac4c64c7 to your computer and use it in GitHub Desktop.
Save pierangelo1982/9fda7097cf6bac4c64c7 to your computer and use it in GitHub Desktop.
#UPLOAD ON AWS S3
create a file named aws.yml in config folder (config/aws.yml)
and insert your aws data bucket.
```
#!yaml
production:
bucket: "xxxxxx"
access_key_id: "xxxxxx"
secret_access_key: "xxxxxxxx"
development:
bucket: "xxxxx"
access_key_id: "xxxxxxxxx"
secret_access_key: "xxxxxxxx"
test:
bucket: "testwedding"
access_key_id: "AKIAJB7MQVFGGGSPT5CA"
secret_access_key: "xxxxxxxxxx"
```
in your production enviromental (development, test or production) set this:
```
#!ruby
config.paperclip_defaults = {
:storage => :s3,
:s3_protocol => 'http',
:s3_host_name => "s3-us-west-2.amazonaws.com",
:s3_credentials => "#{Rails.root}/config/aws.yml"
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment