From 872dd0f8c0d82f04deecc98cfd749ad16f811605 Mon Sep 17 00:00:00 2001 From: asforest Date: Tue, 27 Sep 2022 13:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6MIME=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/ResponseHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ResponseHelper.kt b/src/main/kotlin/ResponseHelper.kt index 4e9df76..07174c9 100644 --- a/src/main/kotlin/ResponseHelper.kt +++ b/src/main/kotlin/ResponseHelper.kt @@ -9,7 +9,7 @@ object ResponseHelper return try { NanoHTTPD.newFixedLengthResponse( NanoHTTPD.Response.Status.OK, - "application/octet-stream", + NanoHTTPD.getMimeTypeForFile("file:///" + file.path), FileInputStream(file._file), file.length.toInt().toLong() )