Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Migration to Active Storage and CloudFront #2606

Open
DmytroStepaniuk opened this issue Jun 4, 2018 · 5 comments
Open

Migration to Active Storage and CloudFront #2606

DmytroStepaniuk opened this issue Jun 4, 2018 · 5 comments

Comments

@DmytroStepaniuk
Copy link

DmytroStepaniuk commented Jun 4, 2018

Previously, I have used paperclip config like following:

config.paperclip_defaults = {
  storage: :s3,
  url: ':s3_alias_url',
  s3_host_alias: ENV['AMAZON_CLOUDFRONT'],
  path: '/:class/:attachment/:id_partition/:style/:filename',
  s3_protocol: :https,
  s3_credentials: {
    bucket: ENV['AMAZON_S3_BUCKET_NAME'],
    access_key_id: ENV['AMAZON_AWS_ACCESS_KEY_ID'],
    secret_access_key: ENV['AMAZON_AWS_SECRET_ACCESS_KEY']
  }
}

There was cloudfront configuration case.

Sooo.

The question.

Is there any way to configure the same thing for Active Storage (S3 I guess 🤔)

@nicogaldamez
Copy link

Have you solved your problem? I need to configure Active Storage with cloud front.

@DmytroStepaniuk
Copy link
Author

@nicogaldamez no, im not.

My question is still ignored :(

I believe You can achieve that by using some another tool that allows to build valid signed url to cloud front🤔

@jywarren
Copy link

jywarren commented Oct 5, 2018

I'd also love to know if people have gotten ActiveStorage working with a CDN - CloudFront, S3 or otherwise!

@coorasse
Copy link

coorasse commented Nov 20, 2018

You can follow this thread: rails/rails#31419.
I seriously think is too early to deprecate Paperclip. ActiveStorage will evolve, but at the moment it cannot replace Paperclip in terms of features and simplicity.

@kzvonov
Copy link

kzvonov commented Jan 26, 2021

Hey, check out this guide https://lipanski.com/posts/activestorage-cdn-rails-direct-route

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

No branches or pull requests

5 participants