Answers for "s3 image upload laravel"

PHP
0

store image to s3 laravel

// Products controller
use IlluminateSupportFacadesStorage;

$image = $request->file('image');
$filePath = 'images/' . $image->getClientOriginalName();
Storage::disk('s3')->put($filePath, file_get_contents($image), 'public');
Posted by: Guest on May-11-2021
0

laravel 7 upload file s3

$image = Image::create([
    'filename' => basename($path),
    'url' => Storage::disk('s3')->url($path)
]);
Posted by: Guest on August-04-2020
0

laravel 7 upload file s3

$path = $request->file('image')->store('images', 's3');
Posted by: Guest on August-04-2020

Browse Popular Code Answers by Language