Skip to content

Commit

Permalink
Resources::Upload: use FeaturedImage ID for info service
Browse files Browse the repository at this point in the history
This matches the behavior of the other helpers and of CarrierwaveFileResolver
  • Loading branch information
dunn committed Apr 3, 2024
1 parent ea5a97c commit 30b50b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/spotlight/resources/upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def sidecar
def to_solr
return {} unless upload&.file_present?

dimensions = Spotlight::Engine.config.iiif_service.info(id)
dimensions = Spotlight::Engine.config.iiif_service.info(upload.id)

{
spotlight_full_image_width_ssm: dimensions.width,
Expand Down
2 changes: 1 addition & 1 deletion lib/spotlight/riiif_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.manifest_url(exhibit, resource)
Spotlight::Engine.routes.url_helpers.manifest_exhibit_solr_document_path(exhibit, "#{exhibit.id}-#{resource.id}")
end

# @param [String] id
# @param [String] id the ID string of a Spotlight::FeaturedImage
# @return [Hash]
def self.info(id)
Riiif::Image.new(id).info
Expand Down

0 comments on commit 30b50b6

Please sign in to comment.