Module: Sufia::GenericFile::Thumbnail
- Extended by:
- ActiveSupport::Concern
- Included in:
- Sufia::GenericFile
- Defined in:
- lib/sufia/models/generic_file/thumbnail.rb
Instance Method Summary collapse
-
#create_thumbnail ⇒ Object
Create thumbnail requires that the characterization has already been run (so mime_type, width and height is available) and that the object is already has a pid set.
Instance Method Details
#create_thumbnail ⇒ Object
Create thumbnail requires that the characterization has already been run (so mime_type, width and height is available) and that the object is already has a pid set
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sufia/models/generic_file/thumbnail.rb', line 7 def create_thumbnail return unless self.content.has_content? if video? create_video_thumbnail else create_derivatives end self.save end |