Forums

Restric Media Files Access

Hi, Im developing a project and im close to release the first version, but I realized that I can access to the entire media directory by the /media/ url, I just want the users to access to their files, how can i restrict that ? I read that one way was using apache, but I dont know if its possible to use within pythonanywhere server.

Hi there,

if you want to apply access control to media files like you do to other pages on your site, you'll have to serve them via your web app, instead of via our Static Files system...

But I deleted the option of media files being serve in the web controls and it still shows them.

two things - did you hit "reload"? and if so, could it be your browser cache?

I saw I was doing something wrong. Sorry Thanks for asnwering!!!

:) glad you figured it out!