Video FIxes : ps
This commit is contained in:
parent
d61279eeb6
commit
d65040e32c
@ -9026,9 +9026,6 @@ class PD_Controller extends REST_Controller
|
||||
$form_id = $records['form_id'];
|
||||
$pd_id = $records['pd_id'];
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($pd_id);
|
||||
if(isset($records['filename']) && $records['filename'] !=""){
|
||||
$temp_file_name = $records['filename'];
|
||||
}else{
|
||||
//Generate Random File Name
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
@ -9037,8 +9034,6 @@ class PD_Controller extends REST_Controller
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
$temp_file_name = $randomString . date('Y-m-d-H-i-s') . '.mp4';
|
||||
|
||||
}
|
||||
log_message('ERROR', "filename = ".$temp_file_name);
|
||||
$lender_id = $pd_master_details[0]['fk_lender_id'];
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX . $lender_id;
|
||||
@ -9064,7 +9059,9 @@ class PD_Controller extends REST_Controller
|
||||
if (is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) {
|
||||
$uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname, $key, $time = '+1 week');
|
||||
log_message('ERROR', '###PD SHORTS VIDEO stored in S3 uri = ' . $uri);
|
||||
$record_data = array('fk_pd_id' => $pd_id, 'pd_document_title' => isset($records['pd_document_title']) ? $records['pd_document_title'] : 'Video', 'pd_document_name' => $temp_file_name, 'fk_form_id' => $form_id, 'is_show_report' => 1, 'rental_count_id' => null, 'location' => null, 'co_applicant_id' => null, 'img_type' => null, 'image_key' => "video", "pd_image_alias_name" => null,"content_type"=>2);
|
||||
$doc_count = $this->db->SELECT('count(*) as count')->FROM(PDDOCUMENTS . ' as PDDOCUMENTS')->WHERE('PDDOCUMENTS.fk_pd_id', $pd_id)->WHERE('PDDOCUMENTS.content_type')->WHERE('PDDOCUMENTS.isactive', 1)->GET()->result_array();
|
||||
$pd_document_title = 'Videos'.((int)$doc_count[0]['count']+1);
|
||||
$record_data = array('fk_pd_id' => $pd_id, 'pd_document_title' => $pd_document_title, 'pd_document_name' => $temp_file_name, 'fk_form_id' => $form_id, 'is_show_report' => 1, 'rental_count_id' => null, 'location' => null, 'co_applicant_id' => null, 'img_type' => null, 'image_key' => "video", "pd_image_alias_name" => null,"content_type"=>2);
|
||||
$record_data['company_id'] = null;
|
||||
$id = $this->PD_Model->saveRecords($record_data, PDDOCUMENTS);
|
||||
if(file_exists($folder_to_check . '/' . $file_name_wo_extension . '.webm')){unlink($folder_to_check . '/' . $file_name_wo_extension . '.webm');}
|
||||
|
||||
@ -1930,8 +1930,8 @@ class Template_Management_Controller extends REST_Controller {
|
||||
if(isset($thrid_arr[$l]['is_multiple']) && $thrid_arr[$l]['is_multiple'] == 0 && $thrid_arr[$l]['answer_value'] == "saved"){
|
||||
for($j=0; $j<count($pd_docs); $j++){
|
||||
$question = $thrid_arr[$l]['question'].' '.($k+1);
|
||||
// echo "\n";
|
||||
if($pd_docs[$j]['image_key'] == $thrid_arr[$l]['question_key'] && $pd_docs[$j]['pd_document_title'] == $question){
|
||||
// echo "\n Tilte=>".$pd_docs[$j]['pd_document_title'];echo "\n Q=>".$question;
|
||||
if($pd_docs[$j]['image_key'] == $thrid_arr[$l]['question_key'] && strtoupper($pd_docs[$j]['pd_document_title']) == strtoupper($question)){
|
||||
// $thrid_arr[$l]['answer_value'] = $pd_docs[$j]['doc_url'];
|
||||
$json[$i]['questions_group'][$k]['questions'][$l]['answer_value'] = $pd_docs[$j]['doc_url'];
|
||||
$json[$i]['questions_group'][$k]['questions'][$l]['pd_document_id'] = $pd_docs[$j]['pd_document_id'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user