Last active
December 16, 2015 02:18
-
-
Save siassaj/5361040 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.paperclip_defaults = { | |
:storage => :s3, | |
:url => ":s3_domain_url" | |
:s3_host_name => "s3.amazonaws.com", | |
:s3_credentials => { | |
:bucket => 'healthyhabitsutah', | |
:access_key_id => ENV['AWS_KEY'], | |
:secret_access_key => ENV['AWS_SECRET'] | |
} | |
} | |
# the correct url to an image is: | |
# http://healthyhabitsutah.s3.amazonaws.com/testimonials/thumbnails/000/000/002/original/rosemary.jpg | |
# | |
# what i'm getting is: | |
# http://healthyhabitsutah.s3.amazonaws.com/healthyhabitsutah/testimonials/thumbnails/000/000/002/original/rosemary.jpg?1365652286 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.paperclip_defaults = { | |
storage: :s3, | |
url: ":s3_domain_url", | |
s3_credentials: { | |
s3_host_name: 's3-ap-southeast-2.amazonaws.com', | |
bucket: "daybookstest", | |
# daybooktest user | |
access_key_id: "aoeu", | |
secret_access_key: "aoeu" | |
}, | |
s3_headers: { :server_side_encryption => :aes256 }, | |
s3_permissions: :private | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Testimonial < ActiveRecord::Base | |
attr_accessible :comment, :date, :name, :thumbnail | |
has_attached_file :thumbnail, | |
:styles => { | |
thumb: '100x100>', | |
full: '300x300>' | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment