Copied to clipboard

Flag this post as spam?

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


  • David Redmond 24 posts 76 karma points
    Mar 31, 2016 @ 00:39
    David Redmond
    0

    Secure upload property editor

    Hi All,

    I'm using the Upload property editor in a member type so that we can upload documents for that member to view.

    The default configuration is working fine however the URLs of the uploaded content is publicly accessible.

    I thought a solution was to add an event handler for when a Media is saved and I could then put some logic in the handler to automatically set permissions on the uploaded document, however when adding an event handler for MediaService.Saved it is not called when the Upload property editor is used, only when we interact with the Media section in Backoffice.

    Does anyone know of a way to automatically, or via a handler, secure documents using the Upload property editor?

    Thanks, David

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Mar 31, 2016 @ 07:07
    Jeavon Leopold
    0

    Hi David,

    The media protect package (licensed) is what you need. https://our.umbraco.org/projects/website-utilities/media-protect/

    Jeavon

  • David Redmond 24 posts 76 karma points
    Mar 31, 2016 @ 07:26
    David Redmond
    0

    Thanks for the reply Jeavon. I reached out to Richard earlier and he replied to let me know that his plugin does not support this configuration.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Mar 31, 2016 @ 07:46
    Jeavon Leopold
    0

    I have used it many times and it does exactly what you have described unless you want specific members to have access to their own files and not others?

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Mar 31, 2016 @ 07:49
    Jeavon Leopold
    0

    Ah yes, I see that is what you want. Media protect will stop public requests but won't support specific member to media permissions.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Mar 31, 2016 @ 07:56
    Jeavon Leopold
    0

    So, I would probably approach this by adding a member picker to a media folder indicating that the contents should be accessible only by that member.

    Then I would create a http handler which would need to check the request, find the media item, find its parent (folder) check for member id, check for member logged in, then either allow or deny

Please Sign in or register to post replies

Write your reply to:

Draft