I have a Django project which is currently protecting media files by using a view which checks user permissions before using sendfile to serve the media (which is hosted on my webserver) via nginx.
I want to move the media to AWS (from my webserver) but if I do that, how do I continue to protect access to the files via Django?
The only options I've seen so far have been to get Django to check the permissions, then download the file and serve it to the user but that's not ideal and it's why I'm using sendfile in the first place!
Is there a way to use sendfile to serve AWS files maybe?
I've also read about AWS presigned URLs but, whilst they do have an expiry date, surely that URL could (before it expires) be available to users that shouldn't be able to see the file?