Seed drag and dropped file over webtorrent
Committed c7931e
--- a/canopy/static/enliven.js
+++ b/canopy/static/enliven.js
const client = new WebTorrent()
DragDrop('body', (files, pos, fileList, directories) => {
console.log(files[0])
- // TODO client.seed(files, torrent => {
- // TODO console.log('Client is seeding ' + torrent.magnetURI)
- // TODO })
+ client.seed(files, torrent => {
+ console.log(`Client is seeding at:\n${torrent.magnetURI}`)
+ })
})
if (cookies.get('rhythm') == 'on') {