Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upcant see downloaded files #1163
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
Figured it out my self |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
now im just a novice just started node barely months ago
i im trying to use web torrent locally gotp bittorrent-tracker up
and this is my code
seeding
var dragDrop = require('drag-drop')
var WebTorrent = require('webtorrent')
var client = new WebTorrent()
// When user drops files on the browser, create a new torrent and start seeding it!
dragDrop('body', function (files) {
client.seed(files, { name: 'works',
comment:'works',
createdBy:'me' ,
announce: ['http://localhost:8000/announce', 'udp://0.0.0.0:8000', 'udp://localhost:8000','ws://localhost:8000']
},
function (torrent) {
console.log('Client is seeding ' + torrent.magnetURI)
})
})
downloading
var WebTorrent = require('webtorrent')
var client = new WebTorrent()
var magnetURI ='magnet:?xt=urn:btih:178c016bb2a1ecd1ccb68a0129de6b4b6ef9f58e&dn=works&tr=http%3A%2F%2Flocalhost%3A8000%2Fannounce&tr=udp%3A%2F%2F0.0.0.0%3A8000&tr=udp%3A%2F%2Flocalhost%3A8000&tr=ws%3A%2F%2Flocalhost%3A8000'
client.add(magnetURI, { path: 'E:/',
announce: ['http://localhost:8000/announce', 'udp://0.0.0.0:8000', 'udp://localhost:8000','ws://localhost:8000']
}, function (torrent) {
torrent.on('done', function () {
console.log('torrent download finished')
})
})
now when seeding code is runned it returns the magnets fine.
but when i run the download code it takes a while and returns 'torrent download finished' in console . and yet i still cant find the downloaded file
please bare with me i cant seem to find what im doing wrong
thanks for the help