Skip to content

Commit dca3a0e

Browse files
authored
Merge pull request #32 from Joemires/main
modify adapter to laavel-9.x^ compactible
2 parents 9918e10 + d0282e8 commit dca3a0e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/FlysystemCloudinaryServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Foundation\Application;
77
use Illuminate\Support\Facades\Storage;
88
use League\Flysystem\Filesystem;
9+
use Illuminate\Filesystem\FilesystemAdapter;
910
use Spatie\LaravelPackageTools\Package;
1011
use Spatie\LaravelPackageTools\PackageServiceProvider;
1112

@@ -21,9 +22,9 @@ public function configurePackage(Package $package): void
2122
public function bootingPackage(): void
2223
{
2324
Storage::extend('cloudinary', function (Application $app, array $config) {
24-
$cloudinary = new Cloudinary($config);
25+
$adapter = new FlysystemCloudinaryAdapter( new Cloudinary($config));
2526

26-
return new Filesystem(new FlysystemCloudinaryAdapter($cloudinary));
27+
return new FilesystemAdapter(new Filesystem($adapter, $config), $adapter, $config);
2728
});
2829
}
2930
}

0 commit comments

Comments
 (0)