Sha256: d4a1d459ef7a70a932e26072e7cade5f2bd3016b2c3b679fd48c2a18c8af9c37
Contents?: true
Size: 915 Bytes
Versions: 5
Compression:
Stored size: 915 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 ActiveSupport::Deprecation.warn("DownloadsController is deprecated. Please use FileAssetsController or create a model specific DownloadsController in your own hydra-head.") fedora_object = ActiveFedora::Base.find(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
5 entries across 5 versions & 1 rubygems