Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How can I restrict media from public access? I've restricted my website (home node) to a certain group which works fine, however if you have link to the media you can access this regardless if your logged in or not.
You can use the package Media Protect.
Yup I second Soren, don't lose time with a custom solution, https://our.umbraco.com/packages/website-utilities/media-protect/ is what you need... and it works in the same way as protecting content... (so roled based)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted