SHARE
TWEET

Untitled

a guest Jan 15th, 2016 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Seed new file
  2. var client = new WebTorrent()
  3. var blob = new Blob([{"helloworld":"world"}], {type: "application/json"});
  4. client.seed(blob, {name: "test.json"}, function (torrent) {
  5.     console.log('Client is seeding ' + torrent.infoHash);
  6. })
  7.  
  8. // Download file
  9. client.add(magnetURI, torrent => {file = torrent.files[0];})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top