PRE SIGN URL EXPIRAY TIME CHANGED

This commit is contained in:
Velz2020 2019-07-22 18:21:23 +05:30
parent 73e42bdf6e
commit d37e6c0139
2 changed files with 15 additions and 2 deletions

View File

@ -110,6 +110,19 @@ class AWS_S3
}
public function getS3SingleObj($bucket_name,$folder_name,$time = '+5 minutes')
{
//echo $time;die();
$result = $this->S3->getObject([
'Bucket' => $bucket_name,
'Key' => $folder_name
//'ResponseContentType' => 'image/png'
//'ResponseContentDisposition' => 'attachment; woodgrass1.jpg',
]);
return result;
}
// Get List of objetcs as byte(Raw file).
public function getAllObjectsInaBucket($bucket_name,$folder_name)
{

View File

@ -221,7 +221,7 @@ class PD_Model extends SPARQ_Model {
/*
*Get All PD Related Documents as signed and expired URL's from S3 Buckets
*/
public function getSignedPDDocsURL($pdid,$form_id = null,$company_id = null,$is_common_api = null,$rental_count_id = null)
public function getSignedPDDocsURL($pdid,$form_id = null,$company_id = null,$is_common_api = null,$rental_count_id = null,$api_client = '')
{
//echo $pdid,$form_id,$company_id;die();
$document_lists = array();
@ -266,7 +266,7 @@ class PD_Model extends SPARQ_Model {
{
$profilepics3path = 'pd'.$pdid.'/'.$value['pd_document_name'];
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$profilepics3path,'+30 minutes');
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$profilepics3path,'+2 day');
$document_lists[$key]['doc_url'] = $singed_uri;
}