Skip to content

Commit

Permalink
#110 paperclip amazon s3 settings added to initializers
Browse files Browse the repository at this point in the history
hamitturkukaya committed Dec 25, 2013
1 parent 05948c9 commit 8b13d54
Showing 3 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions templates/config/initializers/paperclip.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Paperclip::Attachment.default_options[:storage] = :s3
Paperclip::Attachment.default_options[:s3_host_name] = Settings.AWS.S3.end_point
Paperclip::Attachment.default_options[:s3_host_alias] = Settings.AWS.S3.aws_raw_url
Paperclip::Attachment.default_options[:bucket] = Settings.AWS.S3.bucket
Paperclip::Attachment.default_options[:s3_credentials] = {
access_key_id: Settings.AWS.S3.access_key_id,
secret_access_key: Settings.AWS.S3.secret_access_key
}
#Remove command lines

#Paperclip::Attachment.default_options[:storage] = :s3
#Paperclip::Attachment.default_options[:s3_host_name] = Settings.AWS.S3.end_point
#Paperclip::Attachment.default_options[:s3_host_alias] = Settings.AWS.S3.aws_raw_url
#Paperclip::Attachment.default_options[:bucket] = Settings.AWS.S3.bucket
#Paperclip::Attachment.default_options[:s3_credentials] = {
# access_key_id: Settings.AWS.S3.access_key_id,
# secret_access_key: Settings.AWS.S3.secret_access_key
#}
2 changes: 1 addition & 1 deletion templates/config/settings/production.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ smtp:
password: 'password'
authentication: 'plain'

Aws:
AWS:
S3:
bucket: projectname-production
access_key_id: XXXXXXXXXXXXXXXX
2 changes: 1 addition & 1 deletion templates/config/settings/staging.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ smtp:
password: 'password'
authentication: 'plain'

Aws:
AWS:
S3:
bucket: projectname-production
access_key_id: XXXXXXXXXXXXXXXX

0 comments on commit 8b13d54

Please sign in to comment.