Megaupload, Rapidshare-like delivery


(Kiswono Prayogo) #1

I remember about 5 or 10 years ago, there’s a site called MegaUpload, RapidShare, and some other file hosting services that the files cannot be directly downloaded or the files are only valid for certain period of time.

Is there any hint of how they are work in terms of web server technique that can be implemented using Caddy/Go?


(Matthew Fay) #2

Some of them are still around - mega.nz is the current incarnation of Megaupload, I believe.

NextCloud might be one good place to look. From their sharing features page:

Share public links read-only or with editing capabilities
Anonymous upload hides existing files, providing just an upload target
Optionally put a password or expiration date on public link shares

Which seems to match what you’re looking for.

It’s all done in PHP, though - the web server just handles the requests. It’s not something Caddy does, but it is something Caddy can serve for you. You could write something similar in Go or any other language if you wanted, and you could use Caddy to serve that, too.

I actually make use of some smaller, more focused software written in Go, called Linx: https://github.com/andreimarcu/linx-server

You can find NextCloud’s server on Github too, here: https://github.com/nextcloud/server


(Mark) #3

You can use plugin http.upload and its setting random_suffix_len to create hard-to-guess names for uploaded files.