Hello,
I’m looking at replacing the AWS code on a website with Stream. I would like to retrofit/replace this code inside this IF statement below - will send my stream id & key through the existing aws_key aws_secret variables:
if (qa_opt(‘enable_aws’)) {
require QA_INCLUDE_DIR . 's3/aws.phar';
$s3Client = new Aws\S3\S3Client([
'region' => ''.qa_opt('aws_region').'',
'version' => 'latest',
'credentials' => [
'key' => ''.qa_opt('aws_key').'',
'secret' => ''.qa_opt('aws_secret').''
]
]);
$result = $s3Client->putObject([
'Bucket' => ''.qa_opt('aws_bucket').'',
'Key' => $NewFileName,
'SourceFile' => $TempSrc
]);
$output = king_insert_uploads($result['ObjectURL'], $temptype, null, null, 'aws');
$path = $result['ObjectURL'];
}
so $TempSrc will be the user url to the file. got the $NewFileName (may not be needed for Stream).
need to generate the url to the video to pass onto $path (and $output).
Any help would be greatly appreciated.