From fb688ff3643ce6082f5c60138cad6dce41020265 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 25 Oct 2022 12:20:10 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=9F=90=E4=BA=9B=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E8=BD=BD=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E6=89=93=E5=BC=80=E6=98=AF=20zip=20Fix=20https://gith?= =?UTF-8?q?ub.com/siyuan-note/siyuan/issues/6347?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/util/working.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel/util/working.go b/kernel/util/working.go index ee8f97437..f5dba1705 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -335,6 +335,17 @@ func initMime() { mime.AddExtensionType(".js", "application/x-javascript") mime.AddExtensionType(".json", "application/json") mime.AddExtensionType(".html", "text/html") + + // 某些系统上下载资源文件后打开是 zip + // https://github.com/siyuan-note/siyuan/issues/6347 + mime.AddExtensionType(".doc", "application/msword") + mime.AddExtensionType(".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document") + mime.AddExtensionType(".xls", "application/vnd.ms-excel") + mime.AddExtensionType(".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") + mime.AddExtensionType(".dwg", "image/x-dwg") + mime.AddExtensionType(".dxf", "image/x-dxf") + mime.AddExtensionType(".dwf", "drawing/x-dwf") + mime.AddExtensionType(".pdf", "application/pdf") } func KillByPort(port string) {