Amazon S3 Images Expiring – CarrierWave (Ruby on Rails)

Hey everyone,

After working with CarrierWave for a couple of days a few of my images started disappearing. It took a while to work out what was causing it, but thankfully the fix is pretty easy:

  2. #Set fog_public in your initialiser to true
  3. config.fog_public = false
  5. #Should be
  6. config.fog_public = true

Alternatively, if you’d like them to keep expiring but want to adjust their availability you can use the following config option:

  1. #Number of seconds
  2. config.fog_authenticated_url_expiration = 60000

There’s a bit of info in the following StackOverflow post:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.