Turns out I was using the wrong flysystem/flysystem-aws-s3-v3 version.
Jul 23, 2015
4
Level 3
S3 Flysystem given wrong adapter
I keep getting this error when I try to upload a file.
Argument 1 passed to League\Flysystem\AwsS3v3\AwsS3Adapter::__construct() must be an instance of Aws\S3Client, instance of Aws\S3\S3Client given,
Here's my upload code.
if($request->hasFile('cover')){
$file = $request->file('cover');
$ext = $request->file('cover')->guessExtension();
$filename = md5(time()).$ext;
Storage::disk('s3')->put($filename, file_get_contents($file));
$show->cover = $filename;
}
I have league/flysystem-aws-s3-v3 installed.
Please or to participate in this conversation.