🎨 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

This commit is contained in:
Daniel 2024-05-19 17:56:13 +08:00
parent c79238025c
commit 2456b3fd07
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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) {