Skip to content

Commit

Permalink
- Added VidliConfig.s3_expires_in for expiration time to be configured
Browse files Browse the repository at this point in the history
  • Loading branch information
nshbrown committed Jul 20, 2011
1 parent f4f37ed commit 8c92461
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/videos_controller.rb
Expand Up @@ -114,7 +114,7 @@ def download
:secret_access_key => S3SwfUpload::S3Config.secret_access_key
)

redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => 60, :use_ssl => false)
redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => VidliConfig.s3_expires_in, :use_ssl => false)
end

def stream
Expand All @@ -125,6 +125,6 @@ def stream
:secret_access_key => S3SwfUpload::S3Config.secret_access_key
)

redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => 60, :use_ssl => false)
redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => VidliConfig.s3_expires_in, :use_ssl => false)
end
end
4 changes: 2 additions & 2 deletions app/controllers/orders_controller.rb
Expand Up @@ -13,7 +13,7 @@ def download
:secret_access_key => S3SwfUpload::S3Config.secret_access_key
)

redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => 60, :use_ssl => false)
redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => VidliConfig.s3_expires_in, :use_ssl => false)
end

def streaming
Expand All @@ -24,7 +24,7 @@ def streaming
:secret_access_key => S3SwfUpload::S3Config.secret_access_key
)

redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => 60, :use_ssl => false)
redirect_to AWS::S3::S3Object.url_for(@video.s3_path, S3SwfUpload::S3Config.bucket, :expires_in => VidliConfig.s3_expires_in, :use_ssl => false)
end

def watch
Expand Down

0 comments on commit 8c92461

Please sign in to comment.