Skip to content

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

:bug: SVG images cannot be displayed on some systems https://github.com/siyuan-note/siyuan/issues/9413

Danielffcdb5d398da
diff --git a/kernel/util/working.go b/kernel/util/working.go
index 7e44781c49..c3b44e3366 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -380,8 +380,7 @@ func initMime() {
mime.AddExtensionType(".json", "application/json")
mime.AddExtensionType(".html", "text/html")
- // 某些系统上下载资源文件后打开是 zip
- // https://github.com/siyuan-note/siyuan/issues/6347
+ // 某些系统上下载资源文件后打开是 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")
@@ -391,6 +390,9 @@ func initMime() {
mime.AddExtensionType(".dwf", "drawing/x-dwf")
mime.AddExtensionType(".pdf", "application/pdf")
+ // 某些系统上无法显示 SVG 图片 SVG images cannot be displayed on some systems https://github.com/siyuan-note/siyuan/issues/9413
+ mime.AddExtensionType(".svg", "image/svg+xml")
+
// 文档数据文件
mime.AddExtensionType(".sy", "application/json")
}