Created
December 4, 2011 11:39
-
-
Save mlitwiniuk/1429975 to your computer and use it in GitHub Desktop.
CarrierWave - video encoding with Voyeur - app/uploaders/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
class VideoUploader < CarrierWave::Uploader::Base | |
include CarrierWave::VideoConverter | |
storage :file | |
version :mp4 do | |
process :encode_video => [:mp4] | |
def full_filename(for_file) | |
"#{File.basename(for_file, File.extname(for_file))}.mp4" | |
end | |
end | |
version :webm do | |
process :encode_video => [:webm] | |
def full_filename(for_file) | |
"#{File.basename(for_file, File.extname(for_file))}.webm" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment