There are already transfer.sh [1] and other established projects (which I can’t recall right now) that serve this purpose. With more fine-grained control too. A golang compiled executable is also arguably more lightweight than a php app, whether the feature set/code is simpler or not.
[1] https://github.com/dutchcoders/transfer.sh/
Edit: Since more than one person has replied with non-self-hosted solutions, I should note that transfer.sh can be self-hosted, although you can also use the website itself.