From 6a52bce9465f0243b39100ba3f583de63d9c756a Mon Sep 17 00:00:00 2001 From: Johannes Schmidt Date: Mon, 29 Jan 2024 18:36:38 +0100 Subject: [PATCH] fix base-url --- src/main/kotlin/org/devshred/upload/IOService.kt | 2 +- src/main/resources/application.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/devshred/upload/IOService.kt b/src/main/kotlin/org/devshred/upload/IOService.kt index c5fe913..7331213 100644 --- a/src/main/kotlin/org/devshred/upload/IOService.kt +++ b/src/main/kotlin/org/devshred/upload/IOService.kt @@ -44,7 +44,7 @@ class IOService { throw IOException("Could not save file: " + tempFile.getName(), ioe) } val mimeType: String = Tika().detect(tempFile) - val href = "http://${baseUrl}/files/$uuid" + val href = "${baseUrl}/files/$uuid" return StoredFile(uuid, filename, mimeType, href, tempFile.length(), tempFile.absolutePath) } diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 360a2b6..4fd2f88 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,3 +1,3 @@ server.port: 7001 -app.base-url: ${BASE_URL:localhost:7001} \ No newline at end of file +app.base-url: ${BASE_URL:http://localhost:7001} \ No newline at end of file