You are here

public function video_amazon_s3::getVideoUrl in Video 6.4

Same name and namespace in other branches
  1. 6.5 plugins/video_s3/video_s3.lib.inc \video_amazon_s3::getVideoUrl()

File

plugins/video_s3/video_s3.lib.inc, line 282

Class

video_amazon_s3

Code

public function getVideoUrl($filepath, $bucket = NULL) {
  if (variable_get('amazon_s3_private', FALSE)) {
    return $this
      ->get_authenticated_url($filepath, $bucket);
  }
  $cfdomain = variable_get('amazon_s3_cf_domain', FALSE);
  $bucket = $bucket == NULL ? $this->bucket : $bucket;
  return ($this->ssl ? 'https://' : 'http://') . ($cfdomain ? $cfdomain . '/' : $bucket . '.s3.amazonaws.com/') . drupal_urlencode($filepath);

  // Escape spaces
}