WordPress.org

Ready to get started?Download WordPress

Forums

make uploaded files private (2 posts)

  1. cioccoblocco
    Member
    Posted 1 year ago #

    I've various wp sites (versions 3.3.2 - 3.4.2)
    I use the plugin "members" to create "private sections" of the site.
    The problem is that files/media attached to privae pages are still public: a non logged user can't see a page but can retrieve the files attached to that page via the "search" form.
    I need something to make files private too.
    Tere is an old plugin "private files" but it hasn't been updated for more than two years and doesn't work with today's wp version.
    Any possibility?

    TIA
    Antonello

  2. karl19
    Member
    Posted 1 year ago #

    This is something that I've also struggled with during the last few days. I want to make a custom post type viewable only by users who are logged-in, but I also need to make sure that attachments uploaded to these custom posts are not accessible to anyone who is not logged-in.

    The Role Scoper plugin seems like it might allow for this functionality, by adding any attachments added to private posts to .htaccess and then filtering. I can't quite get it to work though.

    Would be great if there was a simpler way to tell WordPress that, if a post is set to private, also make sure all of its attachments are set to private and don't allow direct access to files.

    Or perhaps it would have to be the other way around - filter access to files and check if a file is attached to a private post, if yes, then make sure it's not shown to anyone not logged-in.

Topic Closed

This topic has been closed to new replies.

About this Topic