markevans / dragonfly-s3_data_store

S3 data store for the Dragonfly ruby gem
MIT License
62 stars 58 forks source link

Override hostname used in read for CDN usage #34

Open atiro opened 2 years ago

atiro commented 2 years ago

We've been using the gem for some time to store/retrieve files in S3. We've added a CDN in front of S3 now and would like to be able to generate URLs that access the stored files using the CDN hostname (with the same file path).

This is working fine for 'url_for' with the hostname overrride, but the read method doesn't seem to take this into account and only accesses S3 directly. Is there any way to override that?