Browse files

added documentation for s3 headers as proc

  • Loading branch information...
1 parent 7a8d1e6 commit a83de65ca790f311a7ed70638f497ae258f36952 @iltempo iltempo committed with jyurek Dec 17, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/paperclip/storage/s3.rb
@@ -41,7 +41,9 @@ module Storage
# * +s3_protocol+: The protocol for the URLs generated to your S3 assets. Can be either
# 'http' or 'https'. Defaults to 'http' when your :s3_permissions are :public_read (the
# default), and 'https' when your :s3_permissions are anything else.
- # * +s3_headers+: A hash of headers such as {'Expires' => 1.year.from_now.httpdate}
+ # * +s3_headers+: A hash of headers or a Proc. You may specify a hash such as
+ # {'Expires' => 1.year.from_now.httpdate}. If you use a Proc, headers are determined at
+ # runtime. Paperclip will call that Proc with attachment as the only argument.
# * +bucket+: This is the name of the S3 bucket that will store your files. Remember
# that the bucket must be unique across all of Amazon S3. If the bucket does not exist
# Paperclip will attempt to create it. The bucket name will not be interpolated.

0 comments on commit a83de65

Please sign in to comment.