From 52198be543b3a17b3135428ffc44cd67591b6a6c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 12 Jun 2022 14:26:41 +0600 Subject: [PATCH] fixes in tempupload --- .../ktor/server/TemporalFilesRoutingConfigurator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/TemporalFilesRoutingConfigurator.kt b/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/TemporalFilesRoutingConfigurator.kt index e5f2fa6c36e..685e1607c9e 100644 --- a/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/TemporalFilesRoutingConfigurator.kt +++ b/ktor/server/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/server/TemporalFilesRoutingConfigurator.kt @@ -13,6 +13,7 @@ import io.ktor.http.content.streamProvider import io.ktor.server.application.call import io.ktor.server.request.receiveMultipart import io.ktor.server.response.respond +import io.ktor.server.response.respondText import io.ktor.server.routing.Route import io.ktor.server.routing.post import kotlinx.coroutines.* @@ -111,7 +112,7 @@ class TemporalFilesRoutingConfigurator( temporalFilesMutex.withLock { temporalFilesMap[fileId] = file } - call.respond(fileId.string) + call.respondText(fileId.string) launchSafelyWithoutExceptions { filesFlow.emit(fileId) } } ?: call.respond(HttpStatusCode.BadRequest) }