Sha256: b930df194743cdc9f9f9d2f3054bd2b336125267838ef487150c5ada7658c886
Contents?: true
Size: 745 Bytes
Versions: 4
Compression:
Stored size: 745 Bytes
Contents
class DownloadsController < ApplicationController include Hydra::RepositoryController include Hydra::AssetsControllerHelper helper :downloads # Note: Actual downloads are handled by the index method insead of the show method # in order to avoid ActionController being clever with the filenames/extensions/formats. # To download a datastream, pass the datastream id as ?document_id=#{dsid} in the url def index fedora_object = ActiveFedora::Base.load_instance(params[:asset_id]) if params[:download_id] @datastream = fedora_object.datastreams[params[:download_id]] send_datastream @datastream else @datastreams = downloadables( fedora_object ) end end end
Version data entries
4 entries across 4 versions & 1 rubygems