private function saveBase64ToS3($path, $file): string
{
// $file => base64 string
$image = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '',$file));
$imageName = $path.str_random(10) .'-'.time() . '.png';
Storage::disk('s3')->put($imageName, $image, 'public');
return $imageName;
}
Digər dildə:
EN