Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Cantaloupe on Docker
Commits
69e5ecdf
Unverified
Commit
69e5ecdf
authored
Feb 15, 2021
by
Sebastian Schüpbach
Browse files
build local file path from filename as well
parent
7b7daf1e
Pipeline
#21782
passed with stage
in 5 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
delegates.rb
View file @
69e5ecdf
...
...
@@ -51,14 +51,17 @@ class CustomDelegate
def
source
(
options
=
{})
uri
=
context
[
'identifier'
]
if
uri
.
start_with?
(
"file:"
)
return
'FilesystemSource'
else
if
uri
.
start_with?
(
"http"
)
return
'HttpSource'
else
return
'FilesystemSource'
end
end
def
filesystemsource_pathname
(
options
=
{})
return
"/home/cantaloupe/images/
#{
context
[
'identifier'
].
split
(
"$"
).
last
}
"
filename
=
context
[
'identifier'
]
if
filename
.
start_with?
(
"file:"
)
filename
=
filename
.
split
(
"$"
).
last
return
"/home/cantaloupe/images/
#{
filename
}
"
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment