Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Unable to open PDF https://github.com/siyuan-note/siyuan/issues/12794

Daniel7ed8c311801e
diff --git a/kernel/util/working.go b/kernel/util/working.go
index 7ee81c0311..c79278c1cf 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -413,9 +413,10 @@ func initMime() {
// https://github.com/siyuan-note/siyuan/issues/247
// https://github.com/siyuan-note/siyuan/issues/3813
mime.AddExtensionType(".css", "text/css")
- mime.AddExtensionType(".js", "application/x-javascript")
- mime.AddExtensionType(".json", "application/json")
+ mime.AddExtensionType(".js", "text/javascript")
+ mime.AddExtensionType(".mjs", "text/javascript")
mime.AddExtensionType(".html", "text/html")
+ mime.AddExtensionType(".json", "application/json")
// 某些系统上下载资源文件后打开是 zip https://github.com/siyuan-note/siyuan/issues/6347
mime.AddExtensionType(".doc", "application/msword")