Method: Fog::Storage::AWS::Mock#put_object_acl
- Defined in:
- lib/fog/aws/requests/storage/put_object_acl.rb
permalink #put_object_acl(bucket_name, object_name, acl, options = {}) ⇒ Object
[View source]
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/fog/aws/requests/storage/put_object_acl.rb', line 68 def put_object_acl(bucket_name, object_name, acl, = {}) if acl.is_a?(Hash) self.data[:acls][:object][bucket_name][object_name] = Fog::Storage::AWS.hash_to_acl(acl) else if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl) raise Excon::Errors::BadRequest.new('invalid x-amz-acl') end self.data[:acls][:object][bucket_name][object_name] = acl end end |