From 2b3eb3b8201ecdec465c199a9ca8f7718bbe8d1a Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 25 Feb 2022 21:01:07 +0530 Subject: [PATCH] satellite img format changed from png to jpeg --- api/application/helpers/satellite_image_helper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/application/helpers/satellite_image_helper.php b/api/application/helpers/satellite_image_helper.php index 87901a34..62b0ac8a 100644 --- a/api/application/helpers/satellite_image_helper.php +++ b/api/application/helpers/satellite_image_helper.php @@ -61,21 +61,21 @@ class satellite_image $geo_location = preg_replace('/\s+/', '', $geo_location); $url = "https://maps.googleapis.com/maps/api/staticmap?center=".$geo_location."&zoom=14&markers=color:red|".$geo_location."&size=800x300&maptype=roadmap&key=".$google_map_static_api_key; //echo $url; - $ou = file_put_contents($path_to_check.'/satellite.png', file_get_contents($url)); + $ou = file_put_contents($path_to_check.'/satellite.jpeg', file_get_contents($url)); $satellite_script = $url; //echo $url; // //convert as base 64 image. - $satellite_image_png_path = $path_to_check.'/satellite.png'; + $satellite_image_png_path = $path_to_check.'/satellite.jpeg'; //echo 'all done'; //die(); if($pd_type == 1 ) { $bucketname = LENDER_BUCKET_NAME_PREFIX.$pdmas[0]['fk_lender_id']; - $key = 'pd'.$pdid.'/'.'satellite.png'; - $bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$CI->external_path.'/pd_reports/'.$pdid.'/satellite.png'); + $key = 'pd'.$pdid.'/'.'satellite.jpeg'; + $bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$CI->external_path.'/pd_reports/'.$pdid.'/satellite.jpeg'); $s3result= $CI->aws_s3->uploadFileToS3Bucket($bucket_data); @@ -83,7 +83,7 @@ class satellite_image { $CI->PD_Model->updateRecords(array('isactive' => 0),PDDOCUMENTS,array('pd_document_title' => 'satellite','fk_pd_id' => $pd_id)); - $record_data = array('fk_pd_id' => $pdid,'pd_document_title'=>'satellite','pd_document_name'=>'satellite.png','fk_form_id'=>null,'rental_count_id' => null,'location' => null); + $record_data = array('fk_pd_id' => $pdid,'pd_document_title'=>'satellite','pd_document_name'=>'satellite.jpeg','fk_form_id'=>null,'rental_count_id' => null,'location' => null); $id = $CI->PD_Model->saveRecords($record_data,PDDOCUMENTS); $api_return = $id;