I used this nice example to upload files to my webapp:
Need a minimal Django file upload example
it works well, and I can do most things with it. But when it lists the files they are a clickable link (obviously) and can be downloaded, but I want to only allow this if they are actually logged in. Which I have working thanks to the view decorator @login_required. They problem is if they have a direct link, they can download the file regardless
http://webserver.com/appname/location/media/myfile.docx
I want to lock down direct links and force them to login if it that was put in, the links are to things that are not going through the view though (as per that file upload example)
I fear, I have to lock it down at the server level (and I have no idea how to do that using the python manage.py runserver command for now and I am not sure how I could have apache2 (once in production) know that there is a user logged in and allow the url to that file?