diff --git a/api/application/config/constants.php b/api/application/config/constants.php index e8e13311..59f6682b 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -85,7 +85,8 @@ defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automat defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code // define login route name for token verification -defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors +//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors +defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'login'); // no errors /*********************AWS resources Constants*************************************************/ defined('PROFILEPICTUREBUCKETNAME') OR define('PROFILEPICTUREBUCKETNAME','sineedgedevprofilepic'); diff --git a/api/application/controllers/Branch_Controller.php b/api/application/controllers/Branch_Controller.php index 703cdfed..821207d9 100644 --- a/api/application/controllers/Branch_Controller.php +++ b/api/application/controllers/Branch_Controller.php @@ -134,7 +134,7 @@ class Branch_Controller extends REST_Controller { $s3_signed_urls = array(); foreach($r as $k) { - if($k['Key'] != $folder_name.'/') array_push($s3_signed_urls,$this->aws_s3->getSingleObjectInaBucket($bucket_name,$k['Key'])); + if($k['Key'] != $folder_name.'/') array_push($s3_signed_urls,$this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$k['Key'])); } print_r($s3_signed_urls); diff --git a/api/application/libraries/AWS_S3.php b/api/application/libraries/AWS_S3.php index 5110808d..962d24df 100644 --- a/api/application/libraries/AWS_S3.php +++ b/api/application/libraries/AWS_S3.php @@ -46,7 +46,7 @@ class AWS_S3 try { $result = $this->S3->createBucket(['Bucket' => $BUCKET_NAME,'ACL' => 'authenticated-read']); - print_r($result); + //print_r($result); } catch (AwsException $e) { // output error message if fails echo $e->getMessage(); @@ -76,6 +76,7 @@ class AWS_S3 return $result; } + /* This Function return signed URI of single S3 Object*/ public function getSingleObjectInaBucketAsSignedURI($bucket_name,$folder_name)//get as singed url { $result = array();