public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# encoding: utf-8
 
class TrackUploader < CarrierWave::Uploader::Base
 
include Sprockets::Helpers::RailsHelper
include Sprockets::Helpers::IsolatedHelper
 
include CarrierWaveDirect::Uploader
# Recommended for use with fog
include CarrierWave::MimeTypes
process :set_content_type
 
def extension_white_list
%w(mp3 m4a wav aiff flac)
end
def filename
"#{original_filename}".underscore
end
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.