Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Commits
d995f7dc
Commit
d995f7dc
authored
1 year ago
by
Gyan Gupta
Browse files
Options
Downloads
Patches
Plain Diff
fixed single use download link
parent
c8edf5f5
Branches
bug_fix/single_use_download_link
No related tags found
1 merge request
!250
Fixed single use download link
Pipeline
#11999
failed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hyrax/app/controllers/single_use_links_viewer_controller.rb
+8
-0
8 additions, 0 deletions
hyrax/app/controllers/single_use_links_viewer_controller.rb
hyrax/config/routes.rb
+1
-0
1 addition, 0 deletions
hyrax/config/routes.rb
with
9 additions
and
0 deletions
hyrax/app/controllers/single_use_links_viewer_controller.rb
0 → 100644
+
8
−
0
View file @
d995f7dc
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
This diff is collapsed.
Click to expand it.
hyrax/config/routes.rb
+
1
−
0
View file @
d995f7dc
...
...
@@ -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
=>
'/'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment