Module: Hydra::Derivatives::MimeTypeService

Defined in:
lib/hydra/derivatives/services/mime_type_service.rb

Class Method Summary collapse

Class Method Details

.mime_type(file_path) ⇒ Object

Parameters:

  • file_path (String)

    path to a file



6
7
8
# File 'lib/hydra/derivatives/services/mime_type_service.rb', line 6

def self.mime_type(file_path)
  MIME::Types.type_for(file_path).first.to_s
end