I’m building a NodeJS Torrent client (for fun) using WebTorrent and Supabase in order to save users, some data and also I have a bucket with some available storage.
My question is if it’s possible to download a torrent to the Supabase bucket and having the torrent files online instead of a local folder on my PC.
Here is the code I’m using to manage torrents downloads:
const WebTorrent = require('webtorrent');
const client = new WebTorrent();
const magnetURI = 'magnet: ...';
client.add(magnetURI, { path: 'i would like to use my bucket here' }, function (torrent) {
console.log(torrent);
});
And this is the code I’m using tu upload something to my bucket:
const { data, error } = await supabase.storage
.from('files')
.upload(fileFromTorrent)