# File lib/paperclip/content_type_detector.rb, line 6 def initialize(filename) @filename = filename end
# File lib/paperclip/content_type_detector.rb, line 10 def detect if blank? SENSIBLE_DEFAULT elsif empty? EMPTY_TYPE elsif !match? type_from_file_command elsif !multiple? possible_types.first else best_type_match end.to_s end