Unable to upload .torrent with node.js and utorrent-api

316 views Asked by At

I'm trying to use utorrent-api library for node.js as in example:

request({'uri' : 'http://releases.ubuntu.com/13.04/ubuntu-13.04-desktop-i386.iso.torrent', 'encoding': null}, function (error, response, torrentFileBuffer) {
    utorrent.call('add-file', {'torrent_file': torrentFileBuffer}, function(err, data) {
        if(err) { console.log('error : '); console.log(err); return; }

        console.log('Successfully added torrent file !');
        console.log(data);
    });
});

and I'm getting this error in console:

error :
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

I can connect to uTorrent with:

utorrent.call('list', function(err, torrents_list) {
    console.log(torrents_list);
});

And I'm getting torrents list correctly. I tried to save .torrent file to disk and it looks ok, so the problem is with file upload.

uTorrent 3.3 is running on Linux. WebUI is working and I can upload .torrent files through browser. How can I debug this error?

0

There are 0 answers