# File lib/dragonfly/analysis/file_command_analyser.rb, line 12 def mime_type(temp_object) content_type = if use_filesystem `#{file_command} -b --mime '#{temp_object.path}'` else IO.popen("#{file_command} -b --mime -", 'r+') do |io| if num_bytes_to_check io.write temp_object.data[0, num_bytes_to_check] else io.write temp_object.data end io.close_write io.read end end.split(';').first content_type.strip if content_type end