Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve Smith 75 posts 158 karma points
    Jan 08, 2018 @ 16:47
    Steve Smith
    0

    MediaProtect - removing protection for specific descendent folder

    Hi there,

    Edit to add: Umbraco 7.7, licensed user of Media Protect 2.0

    Just checking something about Media Protect. We have a site we're currently building where we have a branch of documents on the Media tab which should only be available to logged in members.

    So I set up Role based protection for the entire branch of folders containing the "private" files in the Media tab. Everything is working fine, except that I noticed that the small JPEG thumbnail files we create for each PDF are being served up as Pragma:no-cache.

    Again, I can see why Media Protect is doing this, but its not best for performance (as the browser has to download a fresh copy each time the page is loaded).

    We're not bothered about unauthorised users seeing the thumbnails (they're small enough that you literally can't read a single word on them), so I thought I'd "remove protection" from the child folder that contains the thumbnails.

    However, it appears you can't do this. Clicking "Remove protection" on a single child folder doesn't work, and when I check the Umbraco log, it contains:

    MediaProtect.Access.UpdateExeption: Error removing protection for media, see log for details

    (not sure which log I'm meant to be looking at for details?)

    So I'm just checking... is this because you can't exclude a single child folder within a protected branch from Media Protect? Or should this be possible, and instead there's something wrong with our installation?

    Thanks!

    Steve.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Jan 09, 2018 @ 06:56
    Richard Soeteman
    100

    Hi Steve,

    Mediaprotect sets the No-Cache header on protected items indeed. better secure than sorry in this case. And indeed you can't remove protection from child nodes would be to complex to check at runtime. I will make sure the remove option is gone in a later release.

    What you can do is move the thumbnails to a non protected folder and add a relation to the pdf then it will work.

    Hope this helps,

    Richard

  • Steve Smith 75 posts 158 karma points
    Jan 09, 2018 @ 08:44
    Steve Smith
    0

    Hello Richard,

    Thanks for the clarification.

    I think indeed that's what we'll do - move the "Thumbnails" folder to somewhere outside the protected realm.

    Kind regards,

    Steve.

Please Sign in or register to post replies

Write your reply to:

Draft