diff --git a/modules/system/classes/MediaLibrary.php b/modules/system/classes/MediaLibrary.php index 941f6c757..b49a17d0b 100644 --- a/modules/system/classes/MediaLibrary.php +++ b/modules/system/classes/MediaLibrary.php @@ -6,6 +6,7 @@ use Cache; use Config; use Storage; use Request; +use Url; use October\Rain\Filesystem\Definitions as FileDefinitions; use ApplicationException; use SystemException; @@ -538,7 +539,9 @@ class MediaLibrary { $path = $this->validatePath($path); - return $this->storagePath.$path; + $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path))); + + return Url::to($fullPath); } /**