Class: Hyrax::DownloadsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::DownloadsController
- Includes:
- Hydra::Controller::DownloadBehavior, LocalFileDownloadsControllerBehavior, StreamFileDownloadsControllerBehavior, ValkyrieDownloadsControllerBehavior, WorkflowsHelper
- Defined in:
- app/controllers/hyrax/downloads_controller.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#show ⇒ Object
Render the 404 page if the file doesn’t exist.
Methods included from WorkflowsHelper
Methods included from ValkyrieDownloadsControllerBehavior
Class Method Details
.default_content_path ⇒ Object
10 11 12 |
# File 'app/controllers/hyrax/downloads_controller.rb', line 10 def self.default_content_path :original_file end |
Instance Method Details
#show ⇒ Object
Render the 404 page if the file doesn’t exist. Otherwise renders the file.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/hyrax/downloads_controller.rb', line 16 def show return show_valkyrie if Hyrax.config.use_valkyrie? case file when ActiveFedora::File # For original files that are stored in fedora super when String # For derivatives stored on the local file system send_local_content else raise Hyrax::ObjectNotFoundError end end |