The following code example works for Aws::S3::Client, but not for Aws::S3::Encryption::Client.
File.open('filename', 'wb') do |file|
s3_client.get_object(bucket:'bucket', key:'key', response_target: file)
end
The result is an empty file.
However passing a block seems to be a workaround.
File.open('filename', 'wb') do |file|
block = -> chunk { file.write(chunk) }
s3_client.get_object(bucket:'bucket', key:'key', response_target: block)
end
Is this:
- Intended behavior?
- Proper way to stream a file that is encrypted client-side?
The following code example works for
Aws::S3::Client, but not forAws::S3::Encryption::Client.The result is an empty file.
However passing a block seems to be a workaround.
Is this: