Skip to content

Commit

Permalink
Support URLs for custom filesystem drivers (#23964)
Browse files Browse the repository at this point in the history
Some custom filesystem drivers don’t include URL support at the adapter level, but can be added to the driver through the creation of custom plugins. Applications can detect the plugin, but the Filesystem framework currently neglects to check for the ‘getUrl’ method on the driver level.
  • Loading branch information
benargo authored and taylorotwell committed Apr 25, 2018
1 parent e31e141 commit 97aac9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ public function url($path)

if (method_exists($adapter, 'getUrl')) {
return $adapter->getUrl($path);
} elseif (method_exists($this->driver, 'getUrl')) {
return $this->driver->getUrl($path);
} elseif ($adapter instanceof AwsS3Adapter) {
return $this->getAwsUrl($adapter, $path);
} elseif ($adapter instanceof RackspaceAdapter) {
Expand Down

0 comments on commit 97aac9e

Please sign in to comment.