I'm trying to build a file sharing application using Django REST Framework in the backend. In order to upload files, I have the following field in my models:
user_file = models.FileField()
However, when a user uploads a file, that file is stored in the directory of the DRF project, and if I put the path of that file in a browser, every user can then access it as well. How can I prevent this? I've thought of having an Apache HHTPd server where there would be a folder for each user and when a user tries to access a file that was not uploaded my them, the backend would do that verification and would not allow it, but I don't know if that would solves the problem?
How can I do this?
Thanks