Class: Spotlight::CarrierwaveFileResolver
- Inherits:
-
Riiif::AbstractFileSystemResolver
- Object
- Riiif::AbstractFileSystemResolver
- Spotlight::CarrierwaveFileResolver
- Defined in:
- app/services/spotlight/carrierwave_file_resolver.rb
Overview
Used by RIIIF to find files uploaded by carrierwave
Instance Method Summary collapse
-
#initializer ⇒ Object
Override initialzer to avoid deprecation about not providing base path.
- #pattern(id) ⇒ Object
Instance Method Details
#initializer ⇒ Object
Override initialzer to avoid deprecation about not providing base path
5 6 7 |
# File 'app/services/spotlight/carrierwave_file_resolver.rb', line 5 def initializer # nop end |
#pattern(id) ⇒ Object
9 10 11 12 13 14 |
# File 'app/services/spotlight/carrierwave_file_resolver.rb', line 9 def pattern(id) uploaded_file = Spotlight::FeaturedImage.find(id).image.file raise Riiif::ImageNotFoundError, "unable to find file for #{id}" if uploaded_file.nil? uploaded_file.file end |