Skip to content
This repository
Browse code

added documentation for s3 headers as proc

  • Loading branch information...
commit a83de65ca790f311a7ed70638f497ae258f36952 1 parent 7a8d1e6
Alexander Greim authored December 17, 2011 jyurek committed January 09, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  lib/paperclip/storage/s3.rb
4  lib/paperclip/storage/s3.rb
@@ -41,7 +41,9 @@ module Storage
41 41
     # * +s3_protocol+: The protocol for the URLs generated to your S3 assets. Can be either
42 42
     #   'http' or 'https'. Defaults to 'http' when your :s3_permissions are :public_read (the
43 43
     #   default), and 'https' when your :s3_permissions are anything else.
44  
-    # * +s3_headers+: A hash of headers such as {'Expires' => 1.year.from_now.httpdate}
  44
+    # * +s3_headers+: A hash of headers or a Proc. You may specify a hash such as
  45
+    #   {'Expires' => 1.year.from_now.httpdate}. If you use a Proc, headers are determined at
  46
+    #   runtime. Paperclip will call that Proc with attachment as the only argument.
45 47
     # * +bucket+: This is the name of the S3 bucket that will store your files. Remember
46 48
     #   that the bucket must be unique across all of Amazon S3. If the bucket does not exist
47 49
     #   Paperclip will attempt to create it. The bucket name will not be interpolated.

0 notes on commit a83de65

Please sign in to comment.
Something went wrong with that request. Please try again.