Open kstapelfeldt opened 2 years ago
Overview of how to set up using Ark suffixes:
https://ark.digital.utsc.utoronto.ca/ark:61220/utsc11802/<key>
will resolve to <value>
See Arks with IIIFs (google doc) for more detailed instructions on how to set this up
We will use delegate script to support arkid/manifest as a path and use this URL in the interface affordance for accessing the manifest. We will also prototype the solution Amy has discovered and assess the performance hit, and write this up for review by the wider community (hopefully as an article)
The cantaloupe container in isle-dc will take care of any redirection needed to resolve the Ark URLs as long as it has access to the external network (so no need for a delegate script). By default, the cantaloupe container only has access to the default internal network.
Access can be granted by either:
Before building
Edit docker-compose.cantaloupe.yml
, under networks
, add gateway:
OR
After building
Run docker network connect isle-dc_gateway isle-dc_cantaloupe_1
Then, within the manifest, we can use:
https://islandora.traefik.me/cantaloupe/iiif/2/<Ark URL to file (URL encoded)>
instead of:
https://islandora.traefik.me/cantaloupe/iiif/2/<direct link to file (URL encoded)>
For more information, see Arks with IIIFs
Additional Notes - work done for the delegate script
In isle-dc_cantaloupe_1:/opt/tomcat/conf/cantaloupe.properties
, set
delegate_script.pathname = /opt/tomcat/bin/delegates.rb
HttpSource.lookup_strategy = ScriptLookupStrategy
In isle-dc_cantaloupe_1:/opt/tomcat/bin/delegates.rb
,
For one level of redirection:
def httpsource_resource_info(options = {})
response = Net::HTTP.get_response(URI(context['identifier']))
return { "uri" => response['location'] }
end
For more than one level of redirection:
def httpsource_resource_info(options = {})
response = Net::HTTP.get_response(URI(context['identifier']))
until response['location'].nil?
response = Net::HTTP.get_response(URI(response['location']))
end
return { "uri" => response['location'] }
end
Another approach for multilevel redirection: Net::HTTP - Following Redirection
/admin/structure/views/view/iiif_manifest/edit/rest_export_2