Reputation: 79
I'm trying to upload files to Amazon s3 using Laravel 5.8, it actually works on locally but I am unable to get it to work online. I got error:
Class 'League\Flysystem\AwsS3v3\AwsS3Adapter' not found
I've run 'composer dump-autoload', 'composer install'commands I've even tried to upload vendor folder. The .env file is the same locally and online so I'm pretty sure that is not a credentials problem.
This is my post code:
public function postUpload(StoreImage $request)
{
$path = Storage::disk('s3')->put('images/registry', $request->file, 'public');
$request->merge([
'size' => $request->file->getClientSize(),
'path' => $path,
'auth_by' => $request->patient
]);
$this->image->create($request->only('path', 'title', 'size', 'auth_by'));
return back()->with('success', 'Image Successfully Saved');
}
Please any help would be great :).
Upvotes: 2
Views: 3685
Reputation: 101
You should install AWS adapter package
composer require league/flysystem-aws-s3-v3
Upvotes: 3