1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

added support for server-side encryption on s3

This commit is contained in:
John Parker 2012-01-14 12:27:58 -08:00
parent d746580454
commit a5aff0244c

View file

@ -21,6 +21,7 @@ module Fog
attribute :metadata
attribute :owner, :aliases => 'Owner'
attribute :storage_class, :aliases => ['x-amz-storage-class', 'StorageClass']
attribute :encryption, :aliases => 'x-amz-server-side-encryption'
def acl=(new_acl)
valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read']
@ -115,6 +116,7 @@ module Fog
options['Expires'] = expires if expires
options.merge!(metadata)
options['x-amz-storage-class'] = storage_class if storage_class
options['x-amz-server-side-encryption'] = encryption if encryption
data = connection.put_object(directory.key, key, body, options)
data.headers['ETag'].gsub!('"','')