Possible Duplicate:
How to Protect Uploads, if User is not Logged In?
I know how to mark a Page or Post as visible only to members, using the Member Access plugin. This way, the public cannot view them; instead, you have to log in to see the page.
How do I mark a PDF or other Media upload as visible only to members?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Searching this Stack, I can see two possible solutions for this question (not tested).
One
The answer is not fully developed, but can provide some insight.
Restricting access to files within a specific folder
Two
How to Protect Uploads, if User is not Logged In?
Frank Bueltge’s answer seems interesting but the code is quite complex. As he himself admits his english is nasty, but I can assure his coding skills are superb 🙂
And the answer provided by hakre could be operational:
- Protecting one or more folders inside
/wp-content/uploads/through.htaccessas detailed there. - Moving the desired files to this upload folders according to User or Post-ID, and for that the answer I provide to this question should do it. And, with the examples provided, maybe you can think of other kind of filtering.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0