Restricting User Uploads to Logged in View
Quote from ahein on May 15, 2018, 1:49 pmWhat is the best way to restrict user uploads from being viewed publicly?
Noticed that all uploads are in an Asgaros folder, is there a way to lock that down to logged in users?
This plugin is sweet by the way.
What is the best way to restrict user uploads from being viewed publicly?
Noticed that all uploads are in an Asgaros folder, is there a way to lock that down to logged in users?
This plugin is sweet by the way.
Quote from Asgaros on May 15, 2018, 8:29 pmHello @ahein
When you enabled the option “Show uploaded files to logged-in users only” logged-out users cannot see your uploaded files inside of posts. If you want to prevent direct file-access to certain directories for logged-out users, you have to create your own .htaccess rules. I am not sure on how exactly they have to look because it requires some direct access to certain WordPress cookies/login-data I guess.
Hello @ahein
When you enabled the option “Show uploaded files to logged-in users only” logged-out users cannot see your uploaded files inside of posts. If you want to prevent direct file-access to certain directories for logged-out users, you have to create your own .htaccess rules. I am not sure on how exactly they have to look because it requires some direct access to certain WordPress cookies/login-data I guess.
Quote from ahein on May 16, 2018, 6:33 pmThat is what I thought. So I have done that. However, I am able to access outside files…such as the file url below.
http://test-acfas.aspirant.com/wp-content/uploads/asgarosforum/11/beer.jpgThis is the page in question: http://test-acfas.aspirant.com/forums/?view=thread&id=8
Any Ideas?
That is what I thought. So I have done that. However, I am able to access outside files…such as the file url below.
http://test-acfas.aspirant.com/wp-content/uploads/asgarosforum/11/beer.jpg
This is the page in question: http://test-acfas.aspirant.com/forums/?view=thread&id=8
Any Ideas?
Quote from Asgaros on May 16, 2018, 7:27 pmHello @ahein
I dont have any working out-of-the-box solution for this but you can have a look at the following article which should be a good starting-point:
https://wpguru.co.uk/2012/01/how-to-prevent-direct-file-access-in-your-wp-content-directory/
Hello @ahein
I dont have any working out-of-the-box solution for this but you can have a look at the following article which should be a good starting-point:
How to prevent direct file access in your wp-content directory