jam-cloud/ruby/lib/jam_ruby/app/uploaders/music_notation_uploader.rb

25 lines
446 B
Ruby

# encoding: utf-8
class MusicNotationUploader < CarrierWave::Uploader::Base
def initialize(*)
super
JamRuby::UploaderConfiguration.set_aws_private_configuration(self)
end
def store_dir
nil
end
def md5
@md5 ||= ::Digest::MD5.file(current_path).hexdigest
end
def filename
model.filename if model.id
end
def extension_white_list
%w(pdf png jpg jpeg gif xml mxl txt wav flac ogg aiff aifc au)
end
end