Skip to content

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

:art: If a file with the same name exists during export PDF/Docx, it will be automatically renamed https://github.com/siyuan-note/siyuan/issues/11357

Daniel2456b3fd076b
diff --git a/kernel/api/export.go b/kernel/api/export.go
index 7657b277f7..444a1e09ef 100644
--- a/kernel/api/export.go
+++ b/kernel/api/export.go
@@ -412,13 +412,17 @@ func exportDocx(c *gin.Context) {
if nil != arg["merge"] {
merge = arg["merge"].(bool)
}
- err := model.ExportDocx(id, savePath, removeAssets, merge)
+
+ fullPath, err := model.ExportDocx(id, savePath, removeAssets, merge)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
ret.Data = map[string]interface{}{"closeTimeout": 7000}
return
}
+ ret.Data = map[string]interface{}{
+ "path": fullPath,
+ }
}
func exportMdHTML(c *gin.Context) {