Class: Hyrax::TranscriptsController

Inherits:
DownloadsController show all
Defined in:
app/controllers/hyrax/transcripts_controller.rb

Instance Method Summary collapse

Methods inherited from DownloadsController

default_content_path, #hydra_show_active_fedora_file

Methods included from WorkflowsHelper

#workflow_restriction?

Methods included from ValkyrieDownloadsControllerBehavior

#show_valkyrie

Instance Method Details

#showObject



5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/hyrax/transcripts_controller.rb', line 5

def show
  # Using the extracted text from the index is blocked
  # by https://github.com/samvera/hyrax/issues/7410, so we
  # need to get the original file instead.
   = (file_set: Hyrax.query_service.find_by(id: params.require(:id)))
  file = Hyrax.storage_adapter.find_by(id: .file_identifier)

  prepare_file_headers_valkyrie(metadata: , file: file)
  response.headers['Access-Control-Allow-Origin'] = '*'
  send_file file.disk_path, data_options()
end