lundi 11 janvier 2021

Uploading base64_encoded image increasing file size from original size

I am using the below code to upload a base64 encoded image to s3.

$config = ['Expires' => '30 day','CacheControl' => 'max-age=31536000' ];
$path = 'website/'. $image;
Storage::getDriver()->put($path, base64_decode($b64str), $config);

after uploading, I notice that the file in s3 has a higher file size compared to the actual file size.

is there any way I can upload with the same size?

here I attached the file actual size and s3 size screenshot.

Image 1 before the upload file size

enter image description here

Image 2 after the upload file size

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire