Umbraco: Deny public access for media files of content
I'm working with Umbraco 4.11.8.
For my website I have a document type, that contains a field to
upload PDF files. The created content items of this document type aren't
public so a specific membergroup can see them, only. That works fine.
But... When I type the specific path of the PDF file in the browser,
it will show me, but it shouldn't. It just has to be visible for logged
in members.
Is there a way to do this with umbraco or do I have to do this with
the webserver (IIS 7) and the web.config? I'm able to deny the access of
all media files in the media folder, but there are images and files for
public, too. So that isn't the solution.
I would be curious if someone has a way to do this in Umbraco, but you can do this in IIS. You need to notify IIS to send the request for .pdf extension to .net by adding mappings in IIS. You also may need to add HttpHandlers in your web.config or machine.config. Example:
Umbraco: Deny public access for media files of content
I'm working with Umbraco 4.11.8.
For my website I have a document type, that contains a field to upload PDF files. The created content items of this document type aren't public so a specific membergroup can see them, only. That works fine.
But... When I type the specific path of the PDF file in the browser, it will show me, but it shouldn't. It just has to be visible for logged in members.
Is there a way to do this with umbraco or do I have to do this with the webserver (IIS 7) and the web.config? I'm able to deny the access of all media files in the media folder, but there are images and files for public, too. So that isn't the solution.
I would be curious if someone has a way to do this in Umbraco, but you can do this in IIS. You need to notify IIS to send the request for .pdf extension to .net by adding mappings in IIS. You also may need to add HttpHandlers in your web.config or machine.config. Example:
Ken- Fyin.com
is working on a reply...