Please do not downvote as this question does not have tried code. I am new to programming.
So far have a built a big project on local machine. It will automate business workings. However now issue is, while deploying the app to server, Media files are not protected. I mean how to allow media files to be downloaded by logged in users only. As of now anyone with a link can download the file.
In short question is:
How to allow media files (user uploaded files) to be downloaded only by logged in users in NGINX?
Google is not of much help here, need a working example with code. The question is not duplication of How do you Require Login for Media Files in Django I have asked for a working example. If someone can give a working example of django-sendfile that will be great too.