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



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

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