adding prefix to video

This commit is contained in:
Tyrel Souza 2014-05-29 14:04:39 -04:00
parent 8aa6b5ac14
commit 784b083c05

View File

@ -10,10 +10,9 @@ class AmazonCopy
puts "File #{videolisting.videocode} downloaded." puts "File #{videolisting.videocode} downloaded."
s3 = AWS::S3.new s3 = AWS::S3.new
obj = s3.buckets['digitalmarketingvideos'].objects["#{videolisting.videocode}.mp4"] obj = s3.buckets['digitalmarketingvideos'].objects["bvideos/#{videolisting.videocode}.mp4"]
obj.write(file) obj.write(file)
puts "File #{videolisting.videocode} uploaded." puts "File #{videolisting.videocode} uploaded."
ensure ensure
file.close file.close
file.unlink file.unlink