I am trying to upload a file to Amazon s3 server, I followed the Laravel 5.4 documentation that talks about FileSystems. But it returns the error:
Error executing "ListObjects" on "https://s3.amazonaws.com/comercio-urbano?prefix=myfile.txt%2F&max-keys=1&encoding-type=url"; AWS HTTP error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Routes
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index');
Route::get('/test', 'TesteController@teste');
Controller
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
.ENV
AWS_KEY=BKBAJKD62Y324W4T7QUA (
AWS_SECRET=tbG3prt8vrXp5leUp5S65xbak08ZrLBZPNdO+fbC
AWS_REGION=us-east-1
AWS_BUCKET=comercio-urbano
Any suggestion?
If you're using XAMPP on Windows, you need to download certificate and add it to php.ini:
curl.cainfo = "[path_to_certificate]\cacert.pem"
Then restart XAMPP (or Apache).