Answer the question
In order to leave comments, you need to log in
Why is Laravel not connecting to Amazon s3 correctly?
Hello, I'm trying to connect to Yandex Cloud Object Storage (The connection is the same as to Amazon s3).
I connected the library for this:
composer require league/flysystem-aws-s3-v3 ~1.0
I use the following config:
'yandexcloud' => [
'driver' => 's3',
'key' => env('YACLOUD_ACCESS_KEY_ID', 'your_key'),
'secret' => env('YACLOUD_SECRET_ACCESS_KEY', 'your_secret_key'),
'endpoint' => env('YACLOUD_ENDPOINT', 'http://storage.yandexcloud.net/'),
'region' => env('YACLOUD_DEFAULT_REGION', 'us-west-2'),
'bucket' => env('YACLOUD_BUCKET', 'name-backet'),
'url' => 'http://static.example.com/',
],
Aws/S3/Exception/S3Exception with message 'Error executing "PutObject" on "'name-backet.http://storage.yandexcloud.net/"; AWS HTTP error: cURL error 1: Protocol "'name-backet.http" not supported or disabled in libcurl (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for 'name-backet.http://storage.yandexcloud.net/'
Answer the question
In order to leave comments, you need to log in
It turned out that this is a massive bug, the solution is here: https://github.com/laravel/framework/issues/36694
remove `http://` from the endpoint:
'endpoint' => env('YACLOUD_ENDPOINT', 'storage.yandexcloud.net'),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question