README.md in paperclip-aws-1.3.5 vs README.md in paperclip-aws-1.4.0

- old
+ new

@@ -10,10 +10,11 @@ * supports both `http` and `https` urls; * supports expiring urls; * supports different permissions for each Paperclip style; * can generate urls for `read`, `write` и `delete` operations; * correctly sets content-type of uploaded files; +* ability to set content-disposition of uploaded files; * **supports amazon server side encryption** (thanks to [pvertenten](https://github.com/pvertenten)); * highly compatible with included in Paperclip S3 storage module ## Requirements ## @@ -50,12 +51,20 @@ :s3_permissions => :public_read, :s3_protocol => 'http', :s3_options => { :sse => 'AES256', :storage_class => :reduced_redundancy + :content_disposition => 'attachment' }, :path => "company_documents/:id/:style/:data_file_name" + + # You also can modify @s3_options hash directly. + before_save do + self.data.s3_options[:content_disposition] = "attachment; filename=#{self.data_file_name}" + self.data.s3_options[:sse] = true if self.confidential_information? + self.data.s3_options[:storage_class] = true if self.unimportant_information? + end end ## Possible options ## ### :endpoint ### \ No newline at end of file