From 8d5a57d21aa187fcae4dd4e125e445e01dbe198f Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Tue, 14 Dec 2021 22:01:04 +0530 Subject: [PATCH] short url for links2 --- api/application/helpers/video_grabber_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/application/helpers/video_grabber_helper.php b/api/application/helpers/video_grabber_helper.php index 3a51819e..9bca95be 100644 --- a/api/application/helpers/video_grabber_helper.php +++ b/api/application/helpers/video_grabber_helper.php @@ -41,13 +41,13 @@ class video_grabber_helper $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name; $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days'); - + $shortURL = 'https://lkt.pdgenie.com/' . substr($video_name,0,6); if($value['short_link_created_date'] == NULL)//make short url entry in links file { - $shortURL = 'https://lkt.pdgenie.com/' . substr($video_name,0,6); + $localEncryptedURL = PDF_ATTACHEMENT_URL . custom_encryption::encode( 'vdo/'.$date_of_creation.'/'.$pdid.'/'.$value['composition_id']); $file = "/data/web/shortlink/links.txt"; - $concatinated_url = $shortURL." ". $localEncryptedURL; + $concatinated_url = substr($video_name,0,6)." ". $localEncryptedURL; $myfile = file_put_contents($file, $concatinated_url.PHP_EOL , FILE_APPEND | LOCK_EX); //update short_link_created_date in DB @@ -55,7 +55,7 @@ class video_grabber_helper $CI->db->update(VIDEO_ROOM_INFO, array('short_link_created_date' => date('Y-m-d H:i:s'))); } - $result_data[] = array('video_name' => $video_name,'s3_url' => $singed_uri,'url'=>$shortURL,'status' => $value['twilo_status'],'room_id' => $value['room_id'],'id' => $value['video_room_info_id']); + $result_data[] = array('video_name' => $video_name,'s3_url' => $singed_uri,'url'=>$singed_uri,'status' => $value['twilo_status'],'room_id' => $value['room_id'],'id' => $value['video_room_info_id'],'shorturl' => $shortURL); } else {