Skip to content

Commit 589a2c5

Browse files
Merge pull request #700 from IU-Libraries-Joint-Development/iiif_print_work_file
patch IiifPrint::Data::WorkFile for external_storage
2 parents 180217b + cf4dc90 commit 589a2c5

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/extensions/extensions.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,6 @@ def attribute_will_change!(attr)
197197

198198
# support for FileSetPresenter#content_location
199199
Hyrax::FileSetPresenter.include Extensions::Hyrax::FileSetPresenter::ContentLocation
200+
201+
# patch iiif_print to handle external storage
202+
IiifPrint::Data::WorkFile.prepend Extensions::IiifPrint::Data::WorkFile::ExternalFileLocation
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# modified from iiif_print
2+
# uses version of find_or_retrieve that is aware of external storage
3+
module Extensions
4+
module IiifPrint
5+
module Data
6+
module WorkFile
7+
module ExternalFileLocation
8+
private
9+
10+
def checkout
11+
@fileset.find_or_retrieve
12+
end
13+
end
14+
end
15+
end
16+
end
17+
end

0 commit comments

Comments
 (0)