From 4b62f67d0ac56996f18b86b08b71eafa7d5d88e0 Mon Sep 17 00:00:00 2001 From: sanjeev Date: Mon, 29 Nov 2021 21:02:44 +0530 Subject: [PATCH] Short url 1 : ps --- api/application/helpers/video_grabber_helper.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/api/application/helpers/video_grabber_helper.php b/api/application/helpers/video_grabber_helper.php index 52a20857..de1fb39d 100644 --- a/api/application/helpers/video_grabber_helper.php +++ b/api/application/helpers/video_grabber_helper.php @@ -33,14 +33,20 @@ class video_grabber_helper $video_name = $value['composition_id'].'.mp4'; if($value['is_uploaded']){$video_name = $value['composition_id'];} $file_name = $video_name; - $date_of_creation = date('Ymd'); - $shorten_url = custom_encryption::encode( 'vdo/'.$date_of_creation.'/'.$pdid.'/'.$value['composition_id']); - $shorten_url = PDF_ATTACHEMENT_URL.$shorten_url; + $get_url = "127.0.0.1:5000?sh_url?url=".$video_name; + if($get_url['datastatus'] == 200 ){ + $shorten_url = $get_url['data']; + }else{ $shorten_url = ''; } + + // $date_of_creation = date('Ymd'); + // $shorten_url = custom_encryption::encode( 'vdo/'.$date_of_creation.'/'.$pdid.'/'.$value['composition_id']); + // $shorten_url = PDF_ATTACHEMENT_URL.$shorten_url; // $shorten_url = (!empty($uri['vdo']) && ($uri[$key]['video_name'] = $value['composition_id'])) ? PDF_ATTACHEMENT_URL.$uri['vdo'][$key]['url'] : ""; if($value['s3_copied']) { $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name; $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days'); + $result_data[] = array('video_name' => $video_name,'s3_url' => $singed_uri,'url'=>$shorten_url,'status' => $value['twilo_status'],'room_id' => $value['room_id'],'id' => $value['video_room_info_id']); } else