Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
文件MIME使用自动判断
Browse files Browse the repository at this point in the history
  • Loading branch information
asforest committed Sep 27, 2022
1 parent 38288ab commit 872dd0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/ResponseHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
Expand Down

0 comments on commit 872dd0f

Please sign in to comment.