public function video_amazon_s3::get_authenticated_url in Video 6.4
Same name and namespace in other branches
- 6.5 plugins/video_s3/video_s3.lib.inc \video_amazon_s3::get_authenticated_url()
1 call to video_amazon_s3::get_authenticated_url()
- video_amazon_s3::getVideoUrl in plugins/
video_s3/ video_s3.lib.inc
File
- plugins/
video_s3/ video_s3.lib.inc, line 300
Class
Code
public function get_authenticated_url($filepath, $bucket = NULL) {
$lifetime = (int) variable_get('amazon_s3_lifetime', 1800);
$bucket = $bucket == NULL ? $this->bucket : $bucket;
$url = $this->s3
->get_object_url($bucket, $filepath, time() + $lifetime);
if ($this->ssl) {
$url = 'https://' . substr($url, 7);
}
return $url;
}