Skip to content

paperclip issue #478

Description

@megetron

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']
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions