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
-
#initialize ⇒ CarrierwaveFileResolver
constructor
Override initialzer to avoid deprecation about not providing base path.
- #pattern(id) ⇒ Object
Constructor Details
#initialize ⇒ CarrierwaveFileResolver
Override initialzer to avoid deprecation about not providing base path
7 8 9 |
# File 'app/services/spotlight/carrierwave_file_resolver.rb', line 7 def initialize # nop end |
Instance Method Details
#pattern(id) ⇒ Object
11 12 13 14 15 16 |
# File 'app/services/spotlight/carrierwave_file_resolver.rb', line 11 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 |