Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'explicitly enforce dash guid format for thumbnail files from AAPB' #664

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/services/aapb/asset_thumbnail_path_service.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module AAPB
class AssetThumbnailPathService < Hyrax::WorkThumbnailPathService
class << self
S3_THUMBNAIL_BASE = 'http://americanarchive.org.s3.amazonaws.com/thumbnail'.freeze
S3_THUMBNAIL_BASE = 'https://s3.amazonaws.com/americanarchive.org/thumbnail'.freeze
class_attribute :object_type, :sonyci_id, :id, :aapb_digital_instantiation, :digital_instantiations

def call(object)
Expand All @@ -17,7 +17,7 @@ def call(object)
def default_image
if !sonyci_id.empty? && !aapb_digital_instantiation.nil?
if aapb_digital_instantiation.media_type.first == "Moving Image"
ActionController::Base.helpers.image_path("#{S3_THUMBNAIL_BASE}/#{id}.jpg")
ActionController::Base.helpers.image_path("#{S3_THUMBNAIL_BASE}/#{id.gsub(/cpb-aacip./, "cpb-aacip-")}.jpg")
elsif aapb_digital_instantiation.media_type.first == "Sound"
ActionController::Base.helpers.image_path("/thumbs/AUDIO.png")
else
Expand Down