diff --git a/modules/system/classes/MediaLibrary.php b/modules/system/classes/MediaLibrary.php index 93b6fe58f..7c3c1abfe 100644 --- a/modules/system/classes/MediaLibrary.php +++ b/modules/system/classes/MediaLibrary.php @@ -537,9 +537,13 @@ class MediaLibrary { $path = $this->validatePath($path); - $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path))); + $fullPath = $this->storagePath . implode("/", array_map("rawurlencode", explode("/", $path))); - return Url::to($fullPath); + if (Config::get('cms.linkPolicy') === 'force') { + return Url::to($fullPath); + } else { + return $fullPath; + } } /**