php - Incorrect path to S3 flysystem adapter in Laravel 5 -


i'm having issue laravel 5's filesystem when uploading files s3 bucket. line running filesystem is:

storage::disk('s3')->put($slug, $img); 

it works should for:

storage::disk('local')->put($slug, $img); 

but when change disk s3 throws following error:

class 'league\flysystem\awss3v3\awss3adapter' not found 

as per l5 docs, have following requirement in composer.json

"league/flysystem-aws-s3-v2": "~1.0" 

which installed league's aws flysystem adapter under:

league\flysystem-aws-s3-v2\ 

i have tried updating path in filesystemmanager.php in filesystem vendor folder aws flysystem installation path still doesn't work. can't seem find else has experienced behaviour.

a fresh pair of eyes or knowledgeable head might know more laravel great. can't seem issue.

update

i did fresh install of aws flysystem , not following:

errorexception in util.php line 250: fstat() expects parameter 1 resource, object given 

ok fixed initial issue removing aws/aws-sdk-php : "^2.8.* had in composer.json , ran fresh 'composer require league/flysystem-aws-s3-v3 ~1.0'. fixed initial error in finding s3 flysystem.

the second error fstat() expects parameter 1 resource, object given related attempt pass image object put method:

storage::disk('s3')->put($slug, $img); 

when expects string. fixed stringifying $img object

storage::disk('s3')->put($slug, $img->__tostring()); 

hope helps else might encounter issue.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -