2

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');
    }

So I'm getting this error:
Error

Please any help would be great :).

3
  • what version of laravel? Commented Nov 11, 2019 at 20:30
  • i'm using 5.8.* Commented Nov 11, 2019 at 20:32
  • Please share more details, and the error message in readable text form Commented Jan 12, 2021 at 11:38

1 Answer 1

3

You should install AWS adapter package

composer require league/flysystem-aws-s3-v3
Sign up to request clarification or add additional context in comments.

1 Comment

What does "didn't work" mean? What was the output of composer command? Did you run it in your laravel project directory?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.