Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added documentation for s3 headers as proc

  • Loading branch information...
commit a83de65ca790f311a7ed70638f497ae258f36952 1 parent 7a8d1e6
Alexander Greim iltempo authored jyurek committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/paperclip/storage/s3.rb
4 lib/paperclip/storage/s3.rb
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.