samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
182 stars 122 forks source link

WIP - Address valkyrie derivative issues (includes double_combo... do not merge) #6793

Closed laritakr closed 1 month ago

laritakr commented 2 months ago

Keeping this in draft mode... This PR will be canceled once the other PR is merged into main, and then main is merged into double_combo.

Valkyrie derivatives sort of work but only by accident. We need to access them via the storage adapter, rather than assuming we will find them on the file system. This begins the process of accessing derivatives appropriately.

The idea is to always include the options to download derivatives on the actions dropdown.

The actions download menu does not have a Hyrax::FileSet object... it has a Hyrax::IiifAv::IiifFileSetPresenter object (at least when we are using IiifPrint). The extensions_and_mime_types method we added to the fileset gives us an array of hashes that we can use for the actions dropdown:

 [{:id=>"123", :extension=>"pdf", :mime_type=>"application/pdf", :name=>nil, :use=>"OriginalFile"},
    #    {:id=>"234", :extension=>"jpeg", :mime_type=>"application/octet-stream", :name=>"thumbnail", :use=>"ThumbnailImage"}]
github-actions[bot] commented 1 month ago

Test Results

    9 files  ±0      9 suites  ±0   16m 51s :stopwatch: +11s 4 767 tests ±0  4 704 :white_check_mark: ±0  63 :zzz: ±0  0 :x: ±0  6 519 runs  ±0  6 456 :white_check_mark: ±0  63 :zzz: ±0  0 :x: ±0 

Results for commit b493dbfb. ± Comparison against base commit 1bd1166b.

:recycle: This comment has been updated with latest results.

laritakr commented 1 month ago

Pull request passes specs per https://github.com/samvera/hyrax/actions/runs/9101502970