Skip to content

Instantly share code, notes, and snippets.

@leemcalilly
Created February 24, 2013 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemcalilly/5025757 to your computer and use it in GitHub Desktop.
Save leemcalilly/5025757 to your computer and use it in GitHub Desktop.
# 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