VIDEO API 4
This commit is contained in:
parent
fb7de12979
commit
5ce0db9d60
@ -9251,23 +9251,27 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
public function saveCusVideo_post()
|
||||
{
|
||||
|
||||
$records = json_decode($this->post('records'),true);
|
||||
$id = null;
|
||||
log_message('ERROR',print_r($records));
|
||||
//log_message('ERROR','hi');
|
||||
//print_r($records);
|
||||
//print_r($_FILES);
|
||||
//die();
|
||||
if(!empty($_FILES['video_file']))
|
||||
{
|
||||
$pd_master_details = $this->PD_Model->getPDMasterDetails($records['pd_id']);
|
||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||
$key = 'pd'.$records['pd_id'].'/video/'.$records['filename'];
|
||||
//print_r($pd_master_details);//die();
|
||||
/// print_r($pd_master_details);die();
|
||||
|
||||
//$temp_file = XLPATH.'/pd_reports/'.$records['pd_id'].'/temp.txt';
|
||||
$sourcefile = $_FILES['video_file']['tmp_name'];
|
||||
// $current_file = fopen($temp_file,'w');
|
||||
// fwrite($current_file, $records['video_blob']);
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$temp_file);
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
print_r($s3result);
|
||||
// print_r($s3result);
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
log_message('ERROR','###PDVIDEO stored in S3'.$records['pd_id']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user