aws-sdk-s3 1.119.0 → 1.119.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf26a63ccee0e2f3da2e86c8912f58ff25caa023d8e366dfd4d1476e6eaeb962
4
- data.tar.gz: 213793eb4583a409e5c846afdf3b6dc9b268e4d553d78ffef76c5009a5d74929
3
+ metadata.gz: d3b7c8aa05510b674a0aefd7478949c62381e8824f540f83cf8d9bb95f2efbc0
4
+ data.tar.gz: 26be05d50b6aa4592cc19999407bcf8c0bf48f9920117c2c4342c0cce2c91195
5
5
  SHA512:
6
- metadata.gz: 571abaf21736589d1e16a0e547d476bab1238748cb3dc37c5276945e75eb5a7e9a22bac1dc9e5a4c903bdc7af5cec0d10c4ca993fbe7231f298e74127d902728
7
- data.tar.gz: 9e140491506eae90d10c5449fe7e17e35c236b15c2581fe203977f5daeaa4967f586b1093d76d1bb0506120fae33191f03a4509185f6982d82fca2f686663026
6
+ metadata.gz: 3892aa27ece5614efc88c3912e689a15d523d5a582e320d3e0c15763c19507e55c1a097a737918ec7bf9d93214a0f6f558f1c88c99e4db8a45ed6b110b9c1bde
7
+ data.tar.gz: a87d46038da9524fbca4adb42bb6bfbd45da7feef3f64d7dbb085f567d6563184bb01f2c396488ecf88289d5862f47c5d2070e76e9a519bf51911bfe975c4208
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.119.1 (2023-02-13)
5
+ ------------------
6
+
7
+ * Issue - Ensure object metadata is not lost on multipart copy (#2821).
8
+
4
9
  1.119.0 (2023-01-26)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.119.0
1
+ 1.119.1
@@ -15354,7 +15354,7 @@ module Aws::S3
15354
15354
  params: params,
15355
15355
  config: config)
15356
15356
  context[:gem_name] = 'aws-sdk-s3'
15357
- context[:gem_version] = '1.119.0'
15357
+ context[:gem_version] = '1.119.1'
15358
15358
  Seahorse::Client::Request.new(handlers, context)
15359
15359
  end
15360
15360
 
@@ -27,10 +27,13 @@ module Aws
27
27
  # necessary for objects larger than 5GB and can provide
28
28
  # performance improvements on large objects. Amazon S3 does
29
29
  # not accept multipart copies for objects smaller than 5MB.
30
+ # Object metadata such as Content-Type will be copied, however,
31
+ # Checksums are not copied.
30
32
  #
31
33
  # @option options [Integer] :content_length Only used when
32
34
  # `:multipart_copy` is `true`. Passing this options avoids a HEAD
33
- # request to query the source object size. Raises an `ArgumentError` if
35
+ # request to query the source object size but prevents object metadata
36
+ # from being copied. Raises an `ArgumentError` if
34
37
  # this option is provided when `:multipart_copy` is `false` or not set.
35
38
  #
36
39
  # @option options [S3::Client] :copy_source_client Only used when
@@ -24,6 +24,9 @@ module Aws
24
24
  @thread_count = options.delete(:thread_count) || 10
25
25
  @min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
26
26
  @client = options[:client] || Client.new
27
+ if options[:checksum_algorithm]
28
+ raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
29
+ end
27
30
  end
28
31
 
29
32
  # @return [Client]
@@ -31,8 +34,9 @@ module Aws
31
34
 
32
35
  # @option (see S3::Client#copy_object)
33
36
  def copy(options = {})
34
- size = source_size(options)
35
- options[:upload_id] = initiate_upload(options)
37
+ metadata = source_metadata(options)
38
+ size = metadata[:content_length]
39
+ options[:upload_id] = initiate_upload(metadata.merge(options))
36
40
  begin
37
41
  parts = copy_parts(size, default_part_size(size), options)
38
42
  complete_upload(parts, options)
@@ -118,8 +122,10 @@ module Aws
118
122
  end
119
123
  end
120
124
 
121
- def source_size(options)
122
- return options.delete(:content_length) if options[:content_length]
125
+ def source_metadata(options)
126
+ if options[:content_length]
127
+ return { content_length: options.delete(:content_length) }
128
+ end
123
129
 
124
130
  client = options[:copy_source_client] || @client
125
131
 
@@ -132,7 +138,7 @@ module Aws
132
138
  key = CGI.unescape(key)
133
139
  opts = { bucket: bucket, key: key }
134
140
  opts[:version_id] = version_id if version_id
135
- client.head_object(opts).content_length
141
+ client.head_object(opts).to_h
136
142
  end
137
143
 
138
144
  def default_part_size(source_size)
data/lib/aws-sdk-s3.rb CHANGED
@@ -73,6 +73,6 @@ require_relative 'aws-sdk-s3/event_streams'
73
73
  # @!group service
74
74
  module Aws::S3
75
75
 
76
- GEM_VERSION = '1.119.0'
76
+ GEM_VERSION = '1.119.1'
77
77
 
78
78
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.119.0
4
+ version: 1.119.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms