Unverified Commit 69e5ecdf authored by Sebastian Schüpbach's avatar 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
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment