Created
February 24, 2013 21:35
-
-
Save leemcalilly/5025757 to your computer and use it in GitHub Desktop.
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 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment