Photograph fixes : ps
This commit is contained in:
parent
a36551e572
commit
d3f97a0566
@ -8780,12 +8780,11 @@ class PD_Controller extends REST_Controller
|
||||
$final_data[$i][($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : '' );
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (is_array($docs_to_be_collected) && count($docs_to_be_collected)) {
|
||||
$k = 0;
|
||||
foreach ($docs_to_be_collected as $key => $value) {
|
||||
$final_data[] = array('img_key' => 'docs_to_be_collected', 'img_name' => $value['doc_name'], 'fk_form_id' => "24", "is_multiple" => 0, 'pd_image_alias_name' => "", 'is_name_editable' => 0 ,'content_type'=>(strtoupper($key) =='VIDEO' ? "2" : ((strtoupper($key) =='PDF') ? "3" : "1")));
|
||||
$final_data[$k][($value[2] ? 'img_data' : 'img_url')] = ($value[2] ? array() : '' );
|
||||
$final_data[$k]['img_data'] = array() ;
|
||||
$k++;
|
||||
}
|
||||
}
|
||||
@ -8795,11 +8794,7 @@ class PD_Controller extends REST_Controller
|
||||
$final_data = array_filter($final_data, function ($var) {
|
||||
return ($var['content_type'] !== '3');
|
||||
});
|
||||
// $filterBy = '3';
|
||||
// $final_data = array_filter($final_data, function ($var) use ($filterBy) {
|
||||
// return ($var['content_type'] != $filterBy);
|
||||
// });
|
||||
|
||||
$final_data = array_values($final_data);
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = array('pd_id' => $pd_id, 'random_string' => $random_string, 'is_cus_link_disabled' => $is_cus_link_disabled, 'img_data' => $final_data);
|
||||
|
||||
@ -116,12 +116,11 @@ class photo_zip_creator
|
||||
//get zip url from s3 if any
|
||||
$key = 'pd'.$pdid.'/'.$main_applicant_name.'_'.$pdid.'_'.'pd_shortvideo.zip';
|
||||
|
||||
if($regenerate == 0)
|
||||
{
|
||||
$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
}
|
||||
else
|
||||
{
|
||||
// if($regenerate == 0){
|
||||
// $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
$all_pd_shortvideo = $CI->PD_Model->getSignedPDDocsURL($pdid,null,null,null,null,'report_shortVideo');
|
||||
|
||||
@ -151,9 +150,8 @@ class photo_zip_creator
|
||||
unlink($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||
}
|
||||
|
||||
$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
}
|
||||
return $singed_uri;
|
||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,8 @@ class url_shortener
|
||||
|
||||
$uri[ 'ppdf' ] = custom_encryption::encode ( 'ppdf/'.$date_of_creation.'/'.$pdid.'/'.$random_string);
|
||||
$uri[ 'zip' ] = custom_encryption::encode ( 'zip/'.$date_of_creation.'/'.$pdid.'/'.$random_string );
|
||||
$uri[ 'shortvdo' ] = custom_encryption::encode ( 'shortvdo/'.$date_of_creation.'/'.$pdid.'/'.$random_string );
|
||||
$all_pd_shortvideo = $CI->PD_Model->getSignedPDDocsURL($pdid,null,null,null,null,'report_shortVideo');
|
||||
if(count($all_pd_shortvideo)>0){$uri[ 'shortvdo' ] = custom_encryption::encode ( 'shortvdo/'.$date_of_creation.'/'.$pdid.'/'.$random_string );}
|
||||
}
|
||||
// print_r($uri);die();
|
||||
return $uri;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user