From 740959111bee228cda23fe14cd1546c2d971e1c7 Mon Sep 17 00:00:00 2001 From: wjfz Date: Thu, 17 Feb 2022 11:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Storage::extend=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CosStorageServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CosStorageServiceProvider.php b/src/CosStorageServiceProvider.php index b03cc74..10d0d32 100755 --- a/src/CosStorageServiceProvider.php +++ b/src/CosStorageServiceProvider.php @@ -2,6 +2,7 @@ namespace Overtrue\LaravelFilesystem\Cos; +use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Support\Facades\Storage; use Illuminate\Support\ServiceProvider; use League\Flysystem\Filesystem; @@ -17,7 +18,7 @@ public function boot() Storage::extend('cos', function () { $adapter = new CosAdapter(\config('filesystems.disks.cos')); - return new Filesystem($adapter); + return new FilesystemAdapter(new Filesystem($adapter), $adapter); }); }