In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Unverified Commit 565383e0 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

normalise root path


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 9bd362f4
......@@ -27,19 +27,22 @@ trait FileUtils {
val rootPath: String
private val normalize: String => String =
path => if (path.endsWith("/")) path.substring(0, path.length - 1) else path
val videoFilePath: (String, MimeType) => String =
(id, mimeType) => s"$rootPath/$id.${getFileTypeExtension(mimeType).get}"
(id, mimeType) => s"${normalize(rootPath)}/$id.${getFileTypeExtension(mimeType).get}"
val videoPosterPath: String => String =
id => s"$rootPath/${id.replace("/derived", "")}-poster.jp2"
id => s"${normalize(rootPath)}/${id.replace("/derived", "")}-poster.jp2"
val audioFilePath: String => String =
id => s"$rootPath/$id.mp4"
id => s"${normalize(rootPath)}/$id.mp4"
val audioSnippetPath: String => String =
id => s"$rootPath/$id-intro.mp3"
id => s"${normalize(rootPath)}/$id-intro.mp3"
val imageFilePath: String => String =
id => s"$rootPath/$id.jp2"
id => s"${normalize(rootPath)}/$id.jp2"
}
Markdown is supported
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