Get the url from the configured filesystem and remove the first slash of the path

parent 14324323
...@@ -25,7 +25,9 @@ class MediaPath ...@@ -25,7 +25,9 @@ class MediaPath
*/ */
public function getUrl() public function getUrl()
{ {
return Storage::url($this->path); $path = ltrim($this->path, '/');
return Storage::disk(config('asgard.media.config.filesystem'))->url($path);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment