mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
c6b20179a6
commit
c403842c8b
2 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
|
|
@ -330,8 +329,8 @@ func exportAsFile(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
ext := filepath.Ext(file.Filename)
|
||||
name := "save-as-file-" + ast.NewNodeID() + ext
|
||||
name := "export-file-" + file.Filename
|
||||
name = util.FilterFileName(name)
|
||||
tmpDir := filepath.Join(util.TempDir, "export")
|
||||
if err = os.MkdirAll(tmpDir, 0755); nil != err {
|
||||
logging.LogErrorf("export as file failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue