My first thought is that you probably have to write your own middleware that is run before the media-file is accessed, so that you can deny responses where the user is not logged in.
But if there is simpler solution, I would be glad to hear about it :-)
Require login to view PDF / media folder
Hi all,
I'm running version 9.5.0
I have uploaded some PDF files to
domain.com/media/random_folder/readme.pdf
and I would like hide this file/folder behind a login.I have multiple PDF files uploaded in various media folders that I would like to hide behind a login.
It can be ANY login, it doesn't have to be a Umbraco user. Just any "hardcoded" username and login.
How can I achieve this? Does Umbraco version 9.5.0 provide any kind of locked folder feature?
Bests, MBE
Hi,
My first thought is that you probably have to write your own middleware that is run before the media-file is accessed, so that you can deny responses where the user is not logged in.
But if there is simpler solution, I would be glad to hear about it :-)
/ Markus
checkout this discussion for some ideas
https://our.umbraco.com/forum/using-umbraco-and-getting-started/110195-custom-front-end-media-controller
I've used the Media Protect package on a client's site in the past and it worked nicely.
https://our.umbraco.com/packages/website-utilities/media-protect/
Note: the package does require a license.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.