mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 23:50:13 +01:00
🎨 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:
parent
c79238025c
commit
2456b3fd07
1 changed files with 5 additions and 1 deletions
|
|
@ -412,13 +412,17 @@ func exportDocx(c *gin.Context) {
|
||||||
if nil != arg["merge"] {
|
if nil != arg["merge"] {
|
||||||
merge = arg["merge"].(bool)
|
merge = arg["merge"].(bool)
|
||||||
}
|
}
|
||||||
err := model.ExportDocx(id, savePath, removeAssets, merge)
|
|
||||||
|
fullPath, err := model.ExportDocx(id, savePath, removeAssets, merge)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
ret.Data = map[string]interface{}{"closeTimeout": 7000}
|
ret.Data = map[string]interface{}{"closeTimeout": 7000}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
ret.Data = map[string]interface{}{
|
||||||
|
"path": fullPath,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func exportMdHTML(c *gin.Context) {
|
func exportMdHTML(c *gin.Context) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue