Protected Content "media protection" and "url protection" features

Hi guys,
sorry to bother you, but I just don't seem to get how to use two important Protected Content features. I haven't found enough information anywhere and my tests have failed miserably.
Could anybody be so kind as to explain how to use (and what the exact purpose of):
- Media Protection
- url Protection

For what I gather, Media Protection will "protect" media and mask their link.
What is unclear to me is under what circumstances will it do so?
Say I add a "media protected" file on a post, via a button. Say it's a downloadable pdf. Say I make it accessible only to logged in members. The post is not protected (public).
is the expected behaviour that of showing the download button but then warn unauthorised people that they can't download the file?
I tried multiple scenarios and none of the seems to work. The files are actually not protected and the links not masked.

As for the url Protection, why is this feature there? I can't think of a scenario where I'd need to protect a page on my site via url (unless it was something like a Pretty Link masked affiliate link). I am surely missing something!!

Thanks for the help, cheers!

  • Ash

    Hello @emanuele_venditti

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Media Protection will "protect" media and mask their link - you got it right. If you use a protected media file, the src (not link) of that media file will be masked. Make sure, you check this when you are not logged in as super admin. For super admin, no protection will work.

    but then warn unauthorised people that they can't download the file?

    Well, if any user knows the direct url of the image file, then we can't do much to protect the file. in that case, you will need a combination of custom code and htaccess.

    As you are saying, the media protection is not working in your site, would you please explain more about this? I mean what you have done so far, in which page (link) etc. Would you please grant support access from your Dashboard > WPMU DEV > Support > Support Access so that I can check?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    About URL protection, there could be some virtual page that is not listed in the Pages section but you want to protect. For example, you have a dynamic store url: http://domain.com/store/ but there is no real page called Store. In that case, you can simple add that URL and bind it with a protected content level :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • emanuele_venditti

    Thanks Ash.
    That clears my doubts. I see the point of URL Protection now!

    And I think also of the Media Protection. So it's about the SRC not the link.
    So does this mean that the Media Protection pretty much only applies to images DISPLAYED on a page?

    Sorry if this sounds dumb, but I am just trying to understand whether Media Protection would enable me to "protect" downloadable materials such as mp3, pdf, docx, mp4, zip files that I may want to include in a membership site.

    So basically, we are looking at a page. Everyone can see it. But only logged in members belonging to a certain Membership plan can see the button and actually download the content.
    I understand that to make the button visible to only certain members there are shortcodes we can use, but I am still unsure about the rest of the story!

  • Ash

    Hello @emanuele_venditti

    I hope you are well today.

    So does this mean that the Media Protection pretty much only applies to images DISPLAYED on a page?

    Yes, but NOT ONLY images but also all media files that are uploaded by Media Uploader :slight_smile:

    But only logged in members belonging to a certain Membership plan can see the button and actually download the content.
    I understand that to make the button visible to only certain members there are shortcodes we can use, but I am still unsure about the rest of the story!

    Yes, you can protect the download button using the shortcode. And if you enable media protection enabled, and if the media files are uploaded via media uploader, they will be masked.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • emanuele_venditti

    Hi and thanks!
    OK, then I'm missing out the most crucial part, and it could just be something I don't know how to achieve with WordPress.
    I'm only aware of two ways to add media to a page/post, using the Add Media button.
    You either put the content right on the page (this is only possible for images, videos and audio files, I suppose) or you link them to a text link or button or image.

    In the first case the content is displayed on the page. In the second case the content is loaded in a new page. Not downloaded.

    Am I right?

  • Vinod Dalvi

    Hi @emanuele_venditti,

    I'm only aware of two ways to add media to a page/post, using the Add Media button.

    You can also add it using the Media Library Screen as described on the following page.

    https://codex.wordpress.org/Media_Library_Screen

    In the first case the content is displayed on the page. In the second case the content is loaded in a new page. Not downloaded.

    Am I right?

    No let me make it clear. Using the URL Protection you can protect any URL or the pattern of the URL using regex and using Media Protection you can not only protect any media files but also its URLs are masked so that nobody can determine the files actual location on your server.

    In both of the above protection methods, the content is not loaded in the page if the user doesn't have access of it.

    Thanks,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.