aws-sdk-s3 1.73.0 → 1.78.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/bucket.rb +2 -2
- data/lib/aws-sdk-s3/client.rb +127 -114
- data/lib/aws-sdk-s3/customizations/object.rb +12 -1
- data/lib/aws-sdk-s3/encryption.rb +2 -0
- data/lib/aws-sdk-s3/encryption/client.rb +11 -0
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +64 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +41 -5
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +5 -5
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +7 -6
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +32 -3
- data/lib/aws-sdk-s3/encryption/utils.rb +23 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +201 -23
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +40 -12
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +77 -10
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +7 -4
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +24 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +90 -20
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +2 -15
- data/lib/aws-sdk-s3/encryption_v2.rb +4 -1
- data/lib/aws-sdk-s3/file_uploader.rb +11 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +37 -2
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +19 -3
- data/lib/aws-sdk-s3/plugins/accelerate.rb +27 -38
- data/lib/aws-sdk-s3/plugins/dualstack.rb +3 -1
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +1 -1
- data/lib/aws-sdk-s3/presigned_post.rb +61 -28
- data/lib/aws-sdk-s3/presigner.rb +2 -2
- data/lib/aws-sdk-s3/resource.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +25 -8
- metadata +4 -4
@@ -29,6 +29,9 @@ module Aws
|
|
29
29
|
# @param [String, Pathname, File, Tempfile] source The file to upload.
|
30
30
|
# @option options [required, String] :bucket The bucket to upload to.
|
31
31
|
# @option options [required, String] :key The key for the object.
|
32
|
+
# @option options [Proc] :progress_callback
|
33
|
+
# A Proc that will be called when each chunk of the upload is sent.
|
34
|
+
# It will be invoked with [bytes_read], [total_sizes]
|
32
35
|
# @return [void]
|
33
36
|
def upload(source, options = {})
|
34
37
|
if File.size(source) >= multipart_threshold
|
@@ -49,11 +52,19 @@ module Aws
|
|
49
52
|
end
|
50
53
|
|
51
54
|
def put_object(source, options)
|
55
|
+
if (callback = options.delete(:progress_callback))
|
56
|
+
options[:on_chunk_sent] = single_part_progress(callback)
|
57
|
+
end
|
52
58
|
open_file(source) do |file|
|
53
59
|
@client.put_object(options.merge(body: file))
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
63
|
+
def single_part_progress(progress_callback)
|
64
|
+
proc do |_chunk, bytes_read, total_size|
|
65
|
+
progress_callback.call([bytes_read], [total_size])
|
66
|
+
end
|
67
|
+
end
|
57
68
|
end
|
58
69
|
end
|
59
70
|
end
|
@@ -39,6 +39,9 @@ module Aws
|
|
39
39
|
# @param [String, Pathname, File, Tempfile] source The file to upload.
|
40
40
|
# @option options [required, String] :bucket The bucket to upload to.
|
41
41
|
# @option options [required, String] :key The key for the object.
|
42
|
+
# @option options [Proc] :progress_callback
|
43
|
+
# A Proc that will be called when each chunk of the upload is sent.
|
44
|
+
# It will be invoked with [bytes_read], [total_sizes]
|
42
45
|
# @return [void]
|
43
46
|
def upload(source, options = {})
|
44
47
|
if File.size(source) < MIN_PART_SIZE
|
@@ -68,7 +71,7 @@ module Aws
|
|
68
71
|
def upload_parts(upload_id, source, options)
|
69
72
|
pending = PartList.new(compute_parts(upload_id, source, options))
|
70
73
|
completed = PartList.new
|
71
|
-
errors = upload_in_threads(pending, completed)
|
74
|
+
errors = upload_in_threads(pending, completed, options)
|
72
75
|
if errors.empty?
|
73
76
|
completed.to_a.sort_by { |part| part[:part_number] }
|
74
77
|
else
|
@@ -127,12 +130,21 @@ module Aws
|
|
127
130
|
end
|
128
131
|
end
|
129
132
|
|
130
|
-
def upload_in_threads(pending, completed)
|
133
|
+
def upload_in_threads(pending, completed, options)
|
131
134
|
threads = []
|
135
|
+
if (callback = options[:progress_callback])
|
136
|
+
progress = MultipartProgress.new(pending, callback)
|
137
|
+
end
|
132
138
|
@thread_count.times do
|
133
139
|
thread = Thread.new do
|
134
140
|
begin
|
135
141
|
while part = pending.shift
|
142
|
+
if progress
|
143
|
+
part[:on_chunk_sent] =
|
144
|
+
proc do |_chunk, bytes, _total|
|
145
|
+
progress.call(part[:part_number], bytes)
|
146
|
+
end
|
147
|
+
end
|
136
148
|
resp = @client.upload_part(part)
|
137
149
|
part[:body].close
|
138
150
|
completed.push(etag: resp.etag, part_number: part[:part_number])
|
@@ -182,11 +194,34 @@ module Aws
|
|
182
194
|
@mutex.synchronize { @parts.clear }
|
183
195
|
end
|
184
196
|
|
197
|
+
def size
|
198
|
+
@mutex.synchronize { @parts.size }
|
199
|
+
end
|
200
|
+
|
201
|
+
def part_sizes
|
202
|
+
@mutex.synchronize { @parts.map { |p| p[:body].size } }
|
203
|
+
end
|
204
|
+
|
185
205
|
def to_a
|
186
206
|
@mutex.synchronize { @parts.dup }
|
187
207
|
end
|
188
208
|
|
189
209
|
end
|
210
|
+
|
211
|
+
# @api private
|
212
|
+
class MultipartProgress
|
213
|
+
def initialize(parts, progress_callback)
|
214
|
+
@bytes_sent = Array.new(parts.size, 0)
|
215
|
+
@total_sizes = parts.part_sizes
|
216
|
+
@progress_callback = progress_callback
|
217
|
+
end
|
218
|
+
|
219
|
+
def call(part_number, bytes_read)
|
220
|
+
# part numbers start at 1
|
221
|
+
@bytes_sent[part_number - 1] = bytes_read
|
222
|
+
@progress_callback.call(@bytes_sent, @total_sizes)
|
223
|
+
end
|
224
|
+
end
|
190
225
|
end
|
191
226
|
end
|
192
227
|
end
|
@@ -302,7 +302,7 @@ module Aws::S3
|
|
302
302
|
# request_payer: "requester", # accepts requester
|
303
303
|
# })
|
304
304
|
# @param [Hash] options ({})
|
305
|
-
# @option options [String,
|
305
|
+
# @option options [String, StringIO, File] :body
|
306
306
|
# Object data.
|
307
307
|
# @option options [Integer] :content_length
|
308
308
|
# Size of the body in bytes. This parameter is useful when the size of
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -983,7 +983,7 @@ module Aws::S3
|
|
983
983
|
#
|
984
984
|
#
|
985
985
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
986
|
-
# @option options [String,
|
986
|
+
# @option options [String, StringIO, File] :body
|
987
987
|
# Object data.
|
988
988
|
# @option options [String] :cache_control
|
989
989
|
# Can be used to specify caching behavior along the request/reply chain.
|
@@ -48,8 +48,24 @@ module Aws::S3
|
|
48
48
|
data[:last_modified]
|
49
49
|
end
|
50
50
|
|
51
|
-
# The entity tag is
|
52
|
-
#
|
51
|
+
# The entity tag is a hash of the object. The ETag reflects changes only
|
52
|
+
# to the contents of an object, not its metadata. The ETag may or may
|
53
|
+
# not be an MD5 digest of the object data. Whether or not it is depends
|
54
|
+
# on how the object was created and how it is encrypted as described
|
55
|
+
# below:
|
56
|
+
#
|
57
|
+
# * Objects created by the PUT Object, POST Object, or Copy operation,
|
58
|
+
# or through the AWS Management Console, and are encrypted by SSE-S3
|
59
|
+
# or plaintext, have ETags that are an MD5 digest of their object
|
60
|
+
# data.
|
61
|
+
#
|
62
|
+
# * Objects created by the PUT Object, POST Object, or Copy operation,
|
63
|
+
# or through the AWS Management Console, and are encrypted by SSE-C or
|
64
|
+
# SSE-KMS, have ETags that are not an MD5 digest of their object data.
|
65
|
+
#
|
66
|
+
# * If an object is created by either the Multipart Upload or Part Copy
|
67
|
+
# operation, the ETag is not an MD5 digest, regardless of the method
|
68
|
+
# of encryption.
|
53
69
|
# @return [String]
|
54
70
|
def etag
|
55
71
|
data[:etag]
|
@@ -733,7 +749,7 @@ module Aws::S3
|
|
733
749
|
#
|
734
750
|
#
|
735
751
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
736
|
-
# @option options [String,
|
752
|
+
# @option options [String, StringIO, File] :body
|
737
753
|
# Object data.
|
738
754
|
# @option options [String] :cache_control
|
739
755
|
# Can be used to specify caching behavior along the request/reply chain.
|
@@ -3,36 +3,46 @@
|
|
3
3
|
module Aws
|
4
4
|
module S3
|
5
5
|
module Plugins
|
6
|
-
|
7
6
|
# Provides support for using `Aws::S3::Client` with Amazon S3 Transfer
|
8
7
|
# Acceleration.
|
9
8
|
#
|
10
9
|
# Go here for more information about transfer acceleration:
|
11
10
|
# [http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
|
12
11
|
class Accelerate < Seahorse::Client::Plugin
|
13
|
-
|
14
|
-
|
12
|
+
option(
|
13
|
+
:use_accelerate_endpoint,
|
15
14
|
default: false,
|
16
15
|
doc_type: 'Boolean',
|
17
16
|
docstring: <<-DOCS)
|
18
17
|
When set to `true`, accelerated bucket endpoints will be used
|
19
18
|
for all object operations. You must first enable accelerate for
|
20
|
-
each bucket.
|
19
|
+
each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
|
21
20
|
DOCS
|
22
21
|
|
23
22
|
def add_handlers(handlers, config)
|
24
23
|
operations = config.api.operation_names - [
|
25
|
-
:create_bucket, :list_buckets, :delete_bucket
|
24
|
+
:create_bucket, :list_buckets, :delete_bucket
|
26
25
|
]
|
27
|
-
handlers
|
28
|
-
|
26
|
+
# Need 2 handlers so that the context can be set for other plugins
|
27
|
+
# and to remove :use_accelerate_endpoint from the params.
|
28
|
+
handlers.add(
|
29
|
+
OptionHandler, step: :initialize, operations: operations
|
30
|
+
)
|
31
|
+
handlers.add(
|
32
|
+
AccelerateHandler, step: :build, priority: 0, operations: operations
|
33
|
+
)
|
29
34
|
end
|
30
35
|
|
31
36
|
# @api private
|
32
37
|
class OptionHandler < Seahorse::Client::Handler
|
33
38
|
def call(context)
|
34
|
-
|
35
|
-
|
39
|
+
# Support client configuration and per-operation configuration
|
40
|
+
if context.params.is_a?(Hash)
|
41
|
+
accelerate = context.params.delete(:use_accelerate_endpoint)
|
42
|
+
end
|
43
|
+
if accelerate.nil?
|
44
|
+
accelerate = context.config.use_accelerate_endpoint
|
45
|
+
end
|
36
46
|
context[:use_accelerate_endpoint] = accelerate
|
37
47
|
@handler.call(context)
|
38
48
|
end
|
@@ -40,39 +50,24 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3
|
|
40
50
|
|
41
51
|
# @api private
|
42
52
|
class AccelerateHandler < Seahorse::Client::Handler
|
43
|
-
|
44
53
|
def call(context)
|
45
54
|
if context[:use_accelerate_endpoint]
|
46
|
-
|
47
|
-
|
48
|
-
else
|
49
|
-
use_accelerate_endpoint(context)
|
50
|
-
end
|
55
|
+
dualstack = !!context[:use_dualstack_endpoint]
|
56
|
+
use_accelerate_endpoint(context, dualstack)
|
51
57
|
end
|
52
58
|
@handler.call(context)
|
53
59
|
end
|
54
60
|
|
55
61
|
private
|
56
62
|
|
57
|
-
def use_accelerate_endpoint(context)
|
63
|
+
def use_accelerate_endpoint(context, dualstack)
|
58
64
|
bucket_name = context.params[:bucket]
|
59
65
|
validate_bucket_name!(bucket_name)
|
60
66
|
endpoint = URI.parse(context.http_request.endpoint.to_s)
|
61
67
|
endpoint.scheme = 'https'
|
62
68
|
endpoint.port = 443
|
63
|
-
endpoint.host = "#{bucket_name}.s3-accelerate
|
64
|
-
|
65
|
-
# s3 accelerate endpoint doesn't work with 'expect' header
|
66
|
-
context.http_request.headers.delete('expect')
|
67
|
-
end
|
68
|
-
|
69
|
-
def use_combined_accelerate_dualstack_endpoint(context)
|
70
|
-
bucket_name = context.params[:bucket]
|
71
|
-
validate_bucket_name!(bucket_name)
|
72
|
-
endpoint = URI.parse(context.http_request.endpoint.to_s)
|
73
|
-
endpoint.scheme = 'https'
|
74
|
-
endpoint.port = 443
|
75
|
-
endpoint.host = "#{bucket_name}.s3-accelerate.dualstack.amazonaws.com"
|
69
|
+
endpoint.host = "#{bucket_name}.s3-accelerate"\
|
70
|
+
"#{'.dualstack' if dualstack}.amazonaws.com"
|
76
71
|
context.http_request.endpoint = endpoint.to_s
|
77
72
|
# s3 accelerate endpoint doesn't work with 'expect' header
|
78
73
|
context.http_request.headers.delete('expect')
|
@@ -80,17 +75,11 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3
|
|
80
75
|
|
81
76
|
def validate_bucket_name!(bucket_name)
|
82
77
|
unless BucketDns.dns_compatible?(bucket_name, _ssl = true)
|
83
|
-
|
84
|
-
'
|
85
|
-
|
86
|
-
end
|
87
|
-
if bucket_name.include?('.')
|
88
|
-
msg = 'unable to use `accelerate: true` on buckets with dots'\
|
89
|
-
"in their name: #{bucket_name.inspect}"
|
90
|
-
raise ArgumentError, msg
|
78
|
+
raise ArgumentError,
|
79
|
+
'Unable to use `use_accelerate_endpoint: true` on buckets '\
|
80
|
+
'with non-DNS compatible names.'
|
91
81
|
end
|
92
82
|
end
|
93
|
-
|
94
83
|
end
|
95
84
|
end
|
96
85
|
end
|
@@ -22,7 +22,9 @@ for all operations.
|
|
22
22
|
# @api private
|
23
23
|
class OptionHandler < Seahorse::Client::Handler
|
24
24
|
def call(context)
|
25
|
-
|
25
|
+
if context.params.is_a?(Hash)
|
26
|
+
dualstack = context.params.delete(:use_dualstack_endpoint)
|
27
|
+
end
|
26
28
|
dualstack = context.config.use_dualstack_endpoint if dualstack.nil?
|
27
29
|
context[:use_dualstack_endpoint] = dualstack
|
28
30
|
@handler.call(context)
|
@@ -185,35 +185,58 @@ module Aws
|
|
185
185
|
# the post will expire. Defaults to one hour from creation of the
|
186
186
|
# presigned post. May not exceed one week from creation time.
|
187
187
|
# @option options [String] :key See {PresignedPost#key}.
|
188
|
-
# @option options [String] :key_starts_with
|
188
|
+
# @option options [String] :key_starts_with
|
189
|
+
# See {PresignedPost#key_starts_with}.
|
189
190
|
# @option options [String] :acl See {PresignedPost#acl}.
|
190
|
-
# @option options [String] :acl_starts_with
|
191
|
-
#
|
192
|
-
# @option options [String] :
|
191
|
+
# @option options [String] :acl_starts_with
|
192
|
+
# See {PresignedPost#acl_starts_with}.
|
193
|
+
# @option options [String] :cache_control
|
194
|
+
# See {PresignedPost#cache_control}.
|
195
|
+
# @option options [String] :cache_control_starts_with
|
196
|
+
# See {PresignedPost#cache_control_starts_with}.
|
193
197
|
# @option options [String] :content_type See {PresignedPost#content_type}.
|
194
|
-
# @option options [String] :content_type_starts_with
|
195
|
-
#
|
196
|
-
# @option options [String] :
|
197
|
-
#
|
198
|
-
# @option options [String] :
|
198
|
+
# @option options [String] :content_type_starts_with
|
199
|
+
# See {PresignedPost#content_type_starts_with}.
|
200
|
+
# @option options [String] :content_disposition
|
201
|
+
# See {PresignedPost#content_disposition}.
|
202
|
+
# @option options [String] :content_disposition_starts_with
|
203
|
+
# See {PresignedPost#content_disposition_starts_with}.
|
204
|
+
# @option options [String] :content_encoding
|
205
|
+
# See {PresignedPost#content_encoding}.
|
206
|
+
# @option options [String] :content_encoding_starts_with
|
207
|
+
# See {PresignedPost#content_encoding_starts_with}.
|
199
208
|
# @option options [String] :expires See {PresignedPost#expires}.
|
200
|
-
# @option options [String] :expires_starts_with
|
201
|
-
#
|
202
|
-
# @option options [
|
203
|
-
#
|
204
|
-
# @option options [String] :
|
205
|
-
#
|
206
|
-
# @option options [String] :
|
207
|
-
#
|
208
|
-
# @option options [
|
209
|
-
#
|
210
|
-
# @option options [String] :
|
211
|
-
#
|
212
|
-
# @option options [String] :
|
209
|
+
# @option options [String] :expires_starts_with
|
210
|
+
# See {PresignedPost#expires_starts_with}.
|
211
|
+
# @option options [Range<Integer>] :content_length_range
|
212
|
+
# See {PresignedPost#content_length_range}.
|
213
|
+
# @option options [String] :success_action_redirect
|
214
|
+
# See {PresignedPost#success_action_redirect}.
|
215
|
+
# @option options [String] :success_action_redirect_starts_with
|
216
|
+
# See {PresignedPost#success_action_redirect_starts_with}.
|
217
|
+
# @option options [String] :success_action_status
|
218
|
+
# See {PresignedPost#success_action_status}.
|
219
|
+
# @option options [String] :storage_class
|
220
|
+
# See {PresignedPost#storage_class}.
|
221
|
+
# @option options [String] :website_redirect_location
|
222
|
+
# See {PresignedPost#website_redirect_location}.
|
223
|
+
# @option options [Hash<String,String>] :metadata
|
224
|
+
# See {PresignedPost#metadata}.
|
225
|
+
# @option options [Hash<String,String>] :metadata_starts_with
|
226
|
+
# See {PresignedPost#metadata_starts_with}.
|
227
|
+
# @option options [String] :server_side_encryption
|
228
|
+
# See {PresignedPost#server_side_encryption}.
|
229
|
+
# @option options [String] :server_side_encryption_aws_kms_key_id
|
230
|
+
# See {PresignedPost#server_side_encryption_aws_kms_key_id}.
|
231
|
+
# @option options [String] :server_side_encryption_customer_algorithm
|
232
|
+
# See {PresignedPost#server_side_encryption_customer_algorithm}.
|
233
|
+
# @option options [String] :server_side_encryption_customer_key
|
234
|
+
# See {PresignedPost#server_side_encryption_customer_key}.
|
213
235
|
def initialize(credentials, bucket_region, bucket_name, options = {})
|
214
236
|
@credentials = credentials.credentials
|
215
237
|
@bucket_region = bucket_region
|
216
238
|
@bucket_name = bucket_name
|
239
|
+
@accelerate = !!options.delete(:use_accelerate_endpoint)
|
217
240
|
@url = options.delete(:url) || bucket_url
|
218
241
|
@fields = {}
|
219
242
|
@key_set = false
|
@@ -272,7 +295,7 @@ module Aws
|
|
272
295
|
|
273
296
|
# @!group Fields
|
274
297
|
|
275
|
-
# The key to use for the uploaded object.
|
298
|
+
# The key to use for the uploaded object. You can use `${filename}`
|
276
299
|
# as a variable in the key. This will be replaced with the name
|
277
300
|
# of the file as provided by the user.
|
278
301
|
#
|
@@ -507,7 +530,10 @@ module Aws
|
|
507
530
|
# (KMS) master encryption key to use for the object.
|
508
531
|
# @param [String] value
|
509
532
|
# @return [self]
|
510
|
-
define_field(
|
533
|
+
define_field(
|
534
|
+
:server_side_encryption_aws_kms_key_id,
|
535
|
+
'x-amz-server-side-encryption-aws-kms-key-id'
|
536
|
+
)
|
511
537
|
|
512
538
|
# @!endgroup
|
513
539
|
|
@@ -520,7 +546,10 @@ module Aws
|
|
520
546
|
# @param [String] value
|
521
547
|
# @see #server_side_encryption_customer_key
|
522
548
|
# @return [self]
|
523
|
-
define_field(
|
549
|
+
define_field(
|
550
|
+
:server_side_encryption_customer_algorithm,
|
551
|
+
'x-amz-server-side-encryption-customer-algorithm'
|
552
|
+
)
|
524
553
|
|
525
554
|
# Specifies the customer-provided encryption key for Amazon S3 to use
|
526
555
|
# in encrypting data. This value is used to store the object and then
|
@@ -582,10 +611,14 @@ module Aws
|
|
582
611
|
def bucket_url
|
583
612
|
url = Aws::Partitions::EndpointProvider.resolve(@bucket_region, 's3')
|
584
613
|
url = URI.parse(url)
|
585
|
-
if Plugins::BucketDns.dns_compatible?(@bucket_name, true)
|
586
|
-
|
614
|
+
if Plugins::BucketDns.dns_compatible?(@bucket_name, _ssl = true)
|
615
|
+
if @accelerate
|
616
|
+
url.host = "#{@bucket_name}.s3-accelerate.amazonaws.com"
|
617
|
+
else
|
618
|
+
url.host = "#{@bucket_name}.#{url.host}"
|
619
|
+
end
|
587
620
|
else
|
588
|
-
url.path =
|
621
|
+
url.path = "/#{@bucket_name}"
|
589
622
|
end
|
590
623
|
if @bucket_region == 'us-east-1'
|
591
624
|
# keep legacy behavior by default
|
data/lib/aws-sdk-s3/presigner.rb
CHANGED
@@ -41,7 +41,7 @@ module Aws
|
|
41
41
|
# signer = Aws::S3::Presigner.new
|
42
42
|
# url = signer.presigned_url(:get_object, bucket: "bucket", key: "key")
|
43
43
|
#
|
44
|
-
# @param [Symbol]
|
44
|
+
# @param [Symbol] method Symbolized method name of the operation you want
|
45
45
|
# to presign.
|
46
46
|
#
|
47
47
|
# @option params [Integer] :expires_in (900) The number of seconds
|
@@ -89,7 +89,7 @@ module Aws
|
|
89
89
|
# :get_object, bucket: "bucket", key: "key"
|
90
90
|
# )
|
91
91
|
#
|
92
|
-
# @param [Symbol]
|
92
|
+
# @param [Symbol] method Symbolized method name of the operation you want
|
93
93
|
# to presign.
|
94
94
|
#
|
95
95
|
# @option params [Integer] :expires_in (900) The number of seconds
|