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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +4 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +11 -5
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3b7c8aa05510b674a0aefd7478949c62381e8824f540f83cf8d9bb95f2efbc0
|
4
|
+
data.tar.gz: 26be05d50b6aa4592cc19999407bcf8c0bf48f9920117c2c4342c0cce2c91195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3892aa27ece5614efc88c3912e689a15d523d5a582e320d3e0c15763c19507e55c1a097a737918ec7bf9d93214a0f6f558f1c88c99e4db8a45ed6b110b9c1bde
|
7
|
+
data.tar.gz: a87d46038da9524fbca4adb42bb6bfbd45da7feef3f64d7dbb085f567d6563184bb01f2c396488ecf88289d5862f47c5d2070e76e9a519bf51911bfe975c4208
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.119.
|
1
|
+
1.119.1
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -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.
|
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
|
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
|
-
|
35
|
-
|
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
|
122
|
-
|
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).
|
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
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.
|
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-
|
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
|