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:

  1.  
  2. #Set fog_public in your initialiser to true
  3. config.fog_public = false
  4.  
  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: http://stackoverflow.com/a/13757841/522859

Leave a Reply

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