I want to upload my image files into my s3 bucket.but got error
my code
$image = $request->file('photo_one');
$imageFileName = time() . '.' . $image->getClientOriginalExtension();
$s3 = \Storage::disk('s3');
$filePath = '/products/' . $imageFileName;
$s3->put($filePath, file_get_contents($image), 'public');
My File System Configuration
's3' => [
'driver' => 's3',
'key' => 'xxxxx',
'secret' => 'xxxxx',
'region' => 'Oregon',
'bucket' => 'xxxxx',
],
I am getting error
Error executing "PutObject" on "http://ift.tt/2142GLD
/xxx/1455525865.jpeg"; AWS HTTP error: cURL
error 6: Could not resolve host: s3.Oregon.amazonaws.com
(see http://ift.tt/1mgwZgQ)
via Chebli Mohamed
1 commentaire:
'region' => 'us-west-2'
Enregistrer un commentaire