File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 33
33
"imgix/imgix-php" : " ^3.0" ,
34
34
"laravel/framework" : " ~5.6|~5.7|~5.8|^6.0|^7.0|^8.0|^9.0" ,
35
35
"laravel/socialite" : " ^4.2|^5.0" ,
36
- "laravel/ui" : " ^1.0|^2.0|^3.0" ,
36
+ "laravel/ui" : " ^1.0|^2.0|^3.0|^4.0 " ,
37
37
"league/flysystem-aws-s3-v3" : " ^1.0|^2.0|^3.0" ,
38
38
"league/glide-laravel" : " ^1.0" ,
39
39
"matthewbdaly/laravel-azure-storage" : " ^1.3|^2.0" ,
Original file line number Diff line number Diff line change 5
5
use Aws \S3 \S3Client ;
6
6
use Illuminate \Support \Str ;
7
7
use League \Flysystem \Filesystem ;
8
- use League \Flysystem \AwsS3v3 \AwsS3Adapter ;
9
8
10
9
class Aws
11
10
{
@@ -15,7 +14,15 @@ public function filesystemFactory($source)
15
14
16
15
$ client = new S3Client ($ config );
17
16
18
- $ adapter = new AwsS3Adapter ($ client , $ config ['bucket ' ], $ config ['root ' ]);
17
+ if (class_exists ($ class = \League \Flysystem \AwsS3v3 \AwsS3Adapter::class)) {
18
+ $ adapter = new $ class ($ client , $ config ['bucket ' ], $ config ['root ' ]);
19
+ }
20
+ else if (class_exists ($ class = \League \Flysystem \AwsS3V3 \AwsS3V3Adapter::class)) {
21
+ $ adapter = new $ class ($ client , $ config ['bucket ' ], $ config ['root ' ]);
22
+ }
23
+ else {
24
+ throw new \Exception ('Missing compatible aws adapter. ' );
25
+ }
19
26
20
27
return new Filesystem ($ adapter );
21
28
}
You can’t perform that action at this time.
0 commit comments