Make media URLs in accordance with the Link Policy (#3536)
Credit to @adsa95
This commit is contained in:
parent
a1fb23a984
commit
bd2f14d510
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue