Class: Aws::S3::Plugins::Md5s

Inherits:
Seahorse::Client::Plugin
  • Object
show all
Defined in:
lib/aws-sdk-s3/plugins/md5s.rb

Defined Under Namespace

Classes: Handler

Constant Summary collapse

REQUIRED_OPERATIONS =

Amazon S3 requires these operations to have an MD5 checksum

[
  :delete_objects,
  :put_bucket_cors,
  :put_bucket_lifecycle,
  :put_bucket_policy,
  :put_bucket_tagging,
]

Instance Method Summary collapse

Instance Method Details

#add_handlers(handlers, config) ⇒ Object



66
67
68
69
70
71
72
73
74
# File 'lib/aws-sdk-s3/plugins/md5s.rb', line 66

def add_handlers(handlers, config)
  # priority set low to ensure md5 is computed AFTER the request is
  # built but before it is signed
  handlers.add(Handler, {
    priority: 10,
    step: :build,
    operations: config.compute_checksums ? nil : REQUIRED_OPERATIONS,
  })
end