Make media URLs in accordance with the Link Policy (#3536)

Credit to @adsa95
This commit is contained in:
Adam Sandström 2018-12-01 22:08:04 +01:00 committed by Luke Towers
parent a1fb23a984
commit bd2f14d510

View File

@ -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);
}
/**