sylv / micro

A vanity image host with url shortening, 2fa, videos, and much more.
https://micro.sylo.digital
GNU Affero General Public License v3.0
43 stars 4 forks source link

Support downloading files as torrents #20

Open sylv opened 2 years ago

sylv commented 2 years ago

There should be a "Download Torrent" option for files that lets you download files as a torrent. For popular files this would reduce server load and just be pretty cool tbh. It might make sense to only enable it for large (>100mb) files.

We could seed every file, but I think a better option would be to use web seed, which is basically a torrent with some http urls that are used as fallbacks if there are no peers. This is what the internet archive does for their torrents.

This blog covers some details on how it works, this lets you edit torrent files as JSON which will be useful for debugging. This link is a random internet archive entry with a torrent download that will be a useful example for a web seed torrent.