🎨 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"] {
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue