Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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');
 
PREVIOUS NEXT
Tagged: #store #image #laravel
ADD COMMENT
Topic
Name
6+4 =