Adds methods to S3Object for accessing the torrent of a given object.
Grants access to the object with the given key
to be
accessible as a torrent.
# File lib/aws/s3/bittorrent.rb, line 38 def grant_torrent_access_to(key, bucket = nil) policy = acl(key, bucket) return true if policy.grants.include?(:public_read) policy.grants << ACL::Grant.grant(:public_read) acl(key, bucket, policy) end
Returns the torrent file for the object with the given key
.
# File lib/aws/s3/bittorrent.rb, line 32 def torrent_for(key, bucket = nil) get(path!(bucket, key) << '?torrent').body end