mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🐛 设置访问授权码后无法导出 PDF https://github.com/siyuan-note/siyuan/issues/5959
This commit is contained in:
parent
117db7d42e
commit
73e57dba1e
1 changed files with 2 additions and 2 deletions
|
|
@ -193,14 +193,14 @@ func exportTempContent(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
content := arg["content"].(string)
|
content := arg["content"].(string)
|
||||||
tmpExport := filepath.Join(util.TempDir, "export")
|
tmpExport := filepath.Join(util.TempDir, "export", "temp")
|
||||||
if err := os.MkdirAll(tmpExport, 0755); nil != err {
|
if err := os.MkdirAll(tmpExport, 0755); 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
|
||||||
}
|
}
|
||||||
p := filepath.Join(tmpExport, "temp", gulu.Rand.String(7))
|
p := filepath.Join(tmpExport, gulu.Rand.String(7))
|
||||||
if err := os.WriteFile(p, []byte(content), 0644); nil != err {
|
if err := os.WriteFile(p, []byte(content), 0644); nil != err {
|
||||||
ret.Code = 1
|
ret.Code = 1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue