Skip to content

Commit

Permalink
use the s3_options hash to pass in cache and expires headers
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Feb 2, 2009
1 parent 91ffe1b commit 19a1aee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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
Expand Down

0 comments on commit 19a1aee

Please sign in to comment.