satellite img format changed from png to jpeg
This commit is contained in:
parent
01fcd05464
commit
2b3eb3b820
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user