I'm running a file hosting site on nginx where files are stored on the server with random file names.
When a user wants to download the file, I'd like to fetch the original name from a MySQL database and download it with that name using content-disposition
.
I also want this to work with direct links to the file but have no idea how to set content-disposition
this way. I've seen other sites do this, but I'm not sure how to build it myself.