Skip to content

Commit

Permalink
[8.x] Support retrieving URL for Sftp adapter (#36120)
Browse files Browse the repository at this point in the history
* Support retrieving URL for Sftp adapter

* CS Fix

* Update FilesystemAdapter.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
sharifzadesina and taylorotwell authored Feb 2, 2021
1 parent 046d119 commit 46e3bfb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use League\Flysystem\FileExistsException;
use League\Flysystem\FileNotFoundException;
use League\Flysystem\FilesystemInterface;
use League\Flysystem\Sftp\SftpAdapter as Sftp;
use PHPUnit\Framework\Assert as PHPUnit;
use Psr\Http\Message\StreamInterface;
use RuntimeException;
Expand Down Expand Up @@ -449,7 +450,7 @@ public function url($path)
return $this->driver->getUrl($path);
} elseif ($adapter instanceof AwsS3Adapter) {
return $this->getAwsUrl($adapter, $path);
} elseif ($adapter instanceof Ftp) {
} elseif ($adapter instanceof Ftp || $adapter instanceof Sftp) {
return $this->getFtpUrl($path);
} elseif ($adapter instanceof LocalAdapter) {
return $this->getLocalUrl($path);
Expand Down

0 comments on commit 46e3bfb

Please sign in to comment.