Skip to content
Snippets Groups Projects
Commit d995f7dc authored by Gyan Gupta's avatar Gyan Gupta
Browse files

fixed single use download link

parent c8edf5f5
No related tags found
1 merge request!250Fixed single use download link
Pipeline #11999 failed
class SingleUseLinksViewerController < Hyrax::SingleUseLinksViewerController
include HyraxHelper
def download
presigned_url = s3_file_download_url_for_file_set(@asset.id)
send_data URI.open(presigned_url).read, filename: @asset.title[0]
end
end
\ No newline at end of file
......@@ -21,6 +21,7 @@ Rails.application.routes.draw do
end
get 'dashboard/profiles/:id', :to => 'profiles#show'
get 'single_use_link/download/:id' => 'single_use_links_viewer#download', as: :download_single_use_link
mount Hydra::RoleManagement::Engine => '/'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment