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

Objects on S3 can be distributed via the BitTorrent file sharing protocol.

You can get a torrent file for an object by calling torrent_for:

  S3Object.torrent_for 'kiss.jpg', 'marcel'

Or just call the torrent method if you already have the object:

  song = S3Object.find 'kiss.jpg', 'marcel'

Calling grant_torrent_access_to on a object will allow anyone to anonymously fetch the torrent file for that object:

  S3Object.grant_torrent_access_to 'kiss.jpg', 'marcel'

Anonymous requests to

will serve up the torrent file for that object.


Classes and Modules

Module AWS::S3::BitTorrent::ClassMethods

Public Instance methods

Grants torrent access publicly to anyone who requests it on this object.


    # File lib/aws/s3/bittorrent.rb, line 53
53:       def grant_torrent_access
54:         self.class.grant_torrent_access_to(key,
55:       end

Returns the torrent file for the object.


    # File lib/aws/s3/bittorrent.rb, line 48
48:       def torrent
49:         self.class.torrent_for(key,
50:       end