Dreyfuzz
Dreyfuzz

Reputation: 476

Adding Heroku CDN to RefineryCMS

Trying to use asset_sync in a RefineryCMS site on Heroku following this article. Worked out all the problems with rendering from the app/assets directory. Now I'm having issues with images and files uploaded to the site with dragonfly and stored in a separate S3 bucket previously.

Links should look like:

http://myapp.org/system/resources/W1siZiIsIjIwMTMvMDQvMDkvMTgvNDMvNTAvMTE1L0ZhbWlseV9FbnZlbG9wZV9NZXJnZV80XzlfMTMucGRmIl1d/Family%20Letter.pdf

This goes to the bucket I'd set up for uploaded files in config/initializers/images:

   config.s3_backend = Refinery::Core.s3_backend
   config.s3_bucket_name = ENV['S3_BUCKET']
   config.s3_access_key_id = ENV['S3_KEY']
   config.s3_secret_access_key = ENV['S3_SECRET']

This is a SEPARATE bucket from the one used for assets. The link I get instead is:

https://staging-assets.s3.amazonaws.com/system/images/W1siZiIsIjIwMTIvMTAvMDkvMDgvMDUvMjYvMTkxL09jdG9iZXJfQ2FsZW5kYXIuanBnIl0sWyJwIiwidGh1bWIiLCIxMzV4MTM1I2MiXV0/October%20Calendar.jpg

Do I have to transfer all my existing assets into the new bucket (in a "system" directory, I'd guess? Or is there a config var that I can set to say, "go here for dragonfly files"

EDIT: Just found this commit that may address this issue, but I'm not sure. Perhaps someone can clarify how to configure.

Upvotes: 1

Views: 235

Answers (0)

Related Questions