Module AWS::S3::BitTorrent::ClassMethods
In: lib/aws/s3/bittorrent.rb

Adds methods to S3Object for accessing the torrent of a given object.

Methods

Public Instance methods

grant_torrent_access(key, bucket = nil)

Grants access to the object with the given key to be accessible as a torrent.

[Source]

    # File lib/aws/s3/bittorrent.rb, line 38
38:         def grant_torrent_access_to(key, bucket = nil)
39:           policy = acl(key, bucket)
40:           return true if policy.grants.include?(:public_read)
41:           policy.grants << ACL::Grant.grant(:public_read)
42:           acl(key, bucket, policy)
43:         end
torrent(key, bucket = nil)

Alias for torrent_for

Returns the torrent file for the object with the given key.

[Source]

    # File lib/aws/s3/bittorrent.rb, line 32
32:         def torrent_for(key, bucket = nil)
33:           get(path!(bucket, key) << '?torrent').body
34:         end

[Validate]