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