Search code examples
kentico

Kentico permanent link vs direct path


I'm working on some site that all links (dynamic + hard-coded) to media library are permanent links (with getmedia...), which made it so hard to locate the exact folder of the files and update them. I've asked some developer and heard that permanent links are more secure as the system can check who have access to download the materials. Is it a fair statement and why/why not? Thanks for your input!


Solution

  • This is not a fair or correct statement. Access is set at the individual medial library directory, not an individual file level.

    For example, if you have an Images media library which has no security behind it, you can access it directly with a URL of:

    /site/media/images/logo.png or /getmedia/<guid>/logo.png

    and the image will display without issue.

    Now you have another media library called "Secure_Files", if you attempt to access:

    /site/media/secure_files/file1.pdf

    You'll get an error or a login page because the security is set on the

    /site/media/secure_files directory.