How can I get refinerycms to display uploaded image urls from Amazon S3 versus /system/images...?

1.1k views Asked by At

I am running:
Refinery - 2.1.0
Rails - 3.2.14
Ruby - 1.9.3p392

On localhost, I have set up refinery to upload images to Amazon S3. I have set this up by editing my core.rb file to have:

 config.s3_backend = true
 config.s3_access_key_id = 'key here'
 config.s3_secret_access_key = 'access key'
 config.s3_bucket_name = 'bucket name'
 config.s3_region = 'us-west-1'

The images are being uploaded into S3, but the refinery admin displays images as being retrieved from:
localhost:3000/system/images/.../some_image.jpg

Placing an image into a page also displays the same result.

I have done a batch upload into S3, and the images are all into separate folders in S3. How can I get Refinery to pull the image from the remote url?

1

There are 1 answers

0
Chris Wise On

Ok I figured this out and it may be applicable to you.

I found the answer here: https://github.com/refinery/refinerycms/issues/1863

Basically you are likely mounting the Refinery CMS engine at a different mount point than route. You need to set where you are mounting Refinery so that the images will pick up properly.

config.dragonfly_url_host = "/my-mount-point"