From b615e486d6d7a65fc51b58fb1d40fefa4f89be49 Mon Sep 17 00:00:00 2001 From: RhiobeT Date: Tue, 6 Dec 2022 13:29:28 +0100 Subject: [PATCH] Small fixes --- src/main/java/sh/rhiobet/lalafin/file/FileInfoService.java | 1 + src/main/resources/application.yaml.example | 4 ++++ src/main/resources/templates/directory-index.html | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/sh/rhiobet/lalafin/file/FileInfoService.java b/src/main/java/sh/rhiobet/lalafin/file/FileInfoService.java index 95b4cc4..3bce9db 100644 --- a/src/main/java/sh/rhiobet/lalafin/file/FileInfoService.java +++ b/src/main/java/sh/rhiobet/lalafin/file/FileInfoService.java @@ -78,6 +78,7 @@ public class FileInfoService { String requestedUri, FileTokenProvider fileTokenProvider) { Path rootFolderPath = Paths.get(fileApiConfiguration.directory()); Path path = null; + try { path = rootFolderPath.resolve("file").resolve(requestedPath.replaceAll("^/*", "")); } catch (Exception e) { diff --git a/src/main/resources/application.yaml.example b/src/main/resources/application.yaml.example index d41aede..99a04f6 100644 --- a/src/main/resources/application.yaml.example +++ b/src/main/resources/application.yaml.example @@ -24,6 +24,10 @@ quarkus: token: refresh-expired: true +# lalafin: +# base_url: +# user_management_url: + api: file: directory: /lalafin # Files need to be in {directory}/file diff --git a/src/main/resources/templates/directory-index.html b/src/main/resources/templates/directory-index.html index 50029a6..8d86cca 100644 --- a/src/main/resources/templates/directory-index.html +++ b/src/main/resources/templates/directory-index.html @@ -29,7 +29,7 @@ {#if it_count.mod(3) == 1} {/if} - + {#if it.thumbnailUrl} {#if it.type is 'file'} {#if it.viewUrl}