Class: Hyrax::DerivativePath

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb

Instance Method Summary collapse

Instance Method Details

#extensionObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb', line 5

def extension
  case destination_name
  when 'thumbnail'
    ".#{MIME::Types.type_for('jpg').first.extensions.first}"
  when 'display_raster'
    '.tif'
  when 'display_vector'
    '.zip'
  else
    ".#{destination_name}"
  end
end