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:
parent
d746580454
commit
a5aff0244c
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,7 @@ module Fog
|
||||||
attribute :metadata
|
attribute :metadata
|
||||||
attribute :owner, :aliases => 'Owner'
|
attribute :owner, :aliases => 'Owner'
|
||||||
attribute :storage_class, :aliases => ['x-amz-storage-class', 'StorageClass']
|
attribute :storage_class, :aliases => ['x-amz-storage-class', 'StorageClass']
|
||||||
|
attribute :encryption, :aliases => 'x-amz-server-side-encryption'
|
||||||
|
|
||||||
def acl=(new_acl)
|
def acl=(new_acl)
|
||||||
valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
valid_acls = ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
||||||
|
@ -115,6 +116,7 @@ module Fog
|
||||||
options['Expires'] = expires if expires
|
options['Expires'] = expires if expires
|
||||||
options.merge!(metadata)
|
options.merge!(metadata)
|
||||||
options['x-amz-storage-class'] = storage_class if storage_class
|
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 = connection.put_object(directory.key, key, body, options)
|
||||||
data.headers['ETag'].gsub!('"','')
|
data.headers['ETag'].gsub!('"','')
|
||||||
|
|
Loading…
Add table
Reference in a new issue