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
44574336
Commit
44574336
authored
10 months ago
by
Anusha Ranganathan
Committed by
Nils Küster
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove erroneous substituions from file names
parent
eacec4c8
Branches
test/2024-05-16_1
Branches containing commit
Tags
v1.0-beta3-32-g4457433_2024-05-16T06-39-18UTC
No related merge requests found
Pipeline
#14720
passed
10 months ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hyrax/app/models/hyrax/uploaded_file.rb
+2
-2
2 additions, 2 deletions
hyrax/app/models/hyrax/uploaded_file.rb
with
2 additions
and
2 deletions
hyrax/app/models/hyrax/uploaded_file.rb
+
2
−
2
View file @
44574336
...
...
@@ -51,8 +51,8 @@ module Hyrax
parsed_file
=
YAML
.
load_file
(
Rails
.
root
.
join
(
'config'
,
'restricted_files.yml'
))
file_name
=
file
.
file
.
original_filename
if
parsed_file
[
'restricted_file_names'
].
include?
(
file_name
.
gsub
(
/[\s_\-]/
,
''
)
.
downcase
)
if
parsed_file
[
'restricted_file_names'
].
include?
(
file_name
)
||
parsed_file
[
'restricted_file_names'
].
include?
(
file_name
.
downcase
)
errors
.
add
(
:base
,
"This file name is restricted."
)
end
end
...
...
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