amazon s3 - Ruby AWS::S3::S3Object (aws-sdk): Is there a method for streaming data as there is with aws-s3? -


in aws-s3, there method (aws::s3::s3object.stream) lets stream file on s3 local file. have not been able locate similar method in aws-sdk.

i.e. in aws-s3, do:

file.open(to_file, "wb") |file|   aws::s3::s3object.stream(key, region) |chunk|     file.write chunk   end end 

the aws::s3:s3object.read method take block parameter, doesn't seem it.

the aws-sdk gem supports chunked reads of objects in s3. following example gives demonstation:

s3 = aws::s3.new file.open(to_file, "wb") |file|   s3.buckets['bucket-name'].objects['key'].read |chunk|     file.write chunk   end end 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -