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
6622139c
Commit
6622139c
authored
2 years ago
by
Anusha Ranganathan
Browse files
Options
Downloads
Patches
Plain Diff
Fix for issue
#16
parent
7e9d77ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!115
Tombstone not available for dataset
,
!77
Bump ruby v2.7.7
,
!26
Feature/s3 storage
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hyrax/app/helpers/hyrax_helper.rb
+11
-3
11 additions, 3 deletions
hyrax/app/helpers/hyrax_helper.rb
with
11 additions
and
3 deletions
hyrax/app/helpers/hyrax_helper.rb
+
11
−
3
View file @
6622139c
...
...
@@ -26,9 +26,17 @@ module HyraxHelper
bucket
=
Aws
::
S3
::
Resource
.
new
(
region:
ENV
[
'S3_REGION'
]).
bucket
(
file_set
.
parent_works
.
first
.
id
)
latest_version_uri
=
file_set
.
latest_content_version
.
uri
file_key
=
"/
#{
file_set_id
}
/files/
#{
latest_version_uri
.
split
(
"/"
)[
-
3
]
}
/
#{
file_set
.
title
.
first
}
"
begin
latest_version_uri
=
file_set
.
latest_content_version
.
uri
file_key
=
"/
#{
file_set_id
}
/files/
#{
latest_version_uri
.
split
(
"/"
)[
-
3
]
}
/
#{
file_set
.
title
.
first
}
"
rescue
begin
latest_version_uri
=
file_set
.
files
[
0
]
file_key
=
"/
#{
file_set_id
}
/files/
#{
latest_version_uri
.
split
(
"/"
)[
-
1
]
}
/
#{
file_set
.
title
.
first
}
"
rescue
return
nil
end
end
url_options
=
{
expires_in:
60
.
minutes
.
seconds
.
to_i
,
response_content_disposition:
"attachment; filename=
\"
#{
file_key
}
\"
"
...
...
This diff is collapsed.
Click to expand it.
Anusha Ranganathan
@anusha
mentioned in issue
#16 (closed)
·
2 years ago
mentioned in issue
#16 (closed)
mentioned in issue #16
Toggle commit list
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