2024-08-23 14:13:13 +03:00

12 lines
258 B
JavaScript

const { BitTorrentClient } = require('bittorrent');
const uploadToBitTorrent = async (file) => {
const client = new BitTorrentClient();
const torrent = await client.seed(file);
return torrent.magnetURI;
};
module.exports = {
uploadToBitTorrent,
};