Alchemy error reading S3 images

16 views
Skip to first unread message

Maria Jose Gonzalez Antelo

unread,
May 4, 2017, 1:21:13 PM5/4/17
to Alchemy CMS
I have integrated alchemy in heroku with s3, I can upload images in my bucket S3, but I don't know why trying to display them in alchemy/admin/images don't find them.

This is my alchemy_s3.rb

if Rails.env.production?

    require 'dragonfly/s3_data_store'

    pictures_app = Dragonfly.app(:alchemy_pictures)
    pictures_app.configure_with(:imagemagick)
    pictures_app.configure do
      verify_urls false
      datastore :s3,
        bucket_name: ENV.fetch("AWS_PICTURES_DIRECTORY"),
        access_key_id: ENV.fetch("AWS_ACCESS_KEY_ID"),
        secret_access_key: ENV.fetch("AWS_SECRET_ACCESS_KEY"),
        url:            ':s3_domain_url',
        region: ENV.fetch("AWS_REGION"),
        storage_headers: {'x-amz-acl' => 'public-read'},
        url_scheme: 'https'
    end

    attachments_app = Dragonfly.app(:alchemy_attachments)
    attachments_app.configure do
      verify_urls false
      datastore :s3,
        bucket_name: ENV.fetch("AWS_ATTACHMENTS_DIRECTORY"),
        access_key_id: ENV.fetch("AWS_ACCESS_KEY_ID"),
        secret_access_key: ENV.fetch("AWS_SECRET_ACCESS_KEY"),
        region: ENV.fetch("AWS_REGION"),
        url:         ':s3_domain_url',
        storage_headers: {'x-amz-acl' => 'public-read'},
        url_scheme: 'https'
    end
end

Reply all
Reply to author
Forward
0 new messages