diff --git a/app/models/page_attachment.rb b/app/models/page_attachment.rb index 0d4c471..9c2eb47 100644 --- a/app/models/page_attachment.rb +++ b/app/models/page_attachment.rb @@ -1,6 +1,10 @@ class PageAttachment < ActiveRecord::Base acts_as_list :scope => :page_id - has_attachment :storage => :s3, + has_attachment :storage => :s3, + :s3_options => { + :cache_control => 'max-age=315360000', + :expires => 'Thu, 31 Dec 2037 23:55:55 GMT' + } :thumbnails => defined?(PAGE_ATTACHMENT_SIZES) && PAGE_ATTACHMENT_SIZES || {:icon => '144x144>'}, :max_size => 10.megabytes validates_as_attachment