Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paperclip issue #478

Open
megetron opened this issue Apr 21, 2014 · 0 comments
Open

paperclip issue #478

megetron opened this issue Apr 21, 2014 · 0 comments

Comments

@megetron
Copy link

hi there
after configured the paperclip in procudtion.rb file and upload it with heroku, i succeeded upload the files to amazon, but....
the website still shows the image URL of the root directory so all images/attachments are not viewable/downloadable

what do u think?

BTW,
documention to configure the paperclip is incorrect.
I have followed this link:
https://github.com/ging/social_stream/wiki/How-to-deploy-social-stream-to-heroku
and set like it said:

config.paperclip_defaults = {
:s3_credentials => {
:s3_host_name => 's3-website-us-west-2.amazonaws.com'
}
}
and it still upload files to heroku instead of amazon.

googling a bit showed me this to be done (I advice to update if this is correct by you)

In console for new projects don't forget to set the correct S3 data

$ heroku config:set S3_BUCKET_NAME=your_bucket_name

$ heroku config:set AWS_ACCESS_KEY_ID=your_access_key_id

$ heroku config:set AWS_SECRET_ACCESS_KEY=your_secret_access_key

config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV['S3_BUCKET_NAME'],
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant