🎨 Automatically download network assets when the cloud inbox is moved to docs https://github.com/siyuan-note/siyuan/issues/9775

This commit is contained in:
Daniel 2023-11-29 10:07:52 +08:00
parent d647335d6e
commit a8625ca27d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 188 additions and 10 deletions

View file

@ -25,6 +25,25 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func netAssets2LocalAssets(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
id := arg["id"].(string)
err := model.NetAssets2LocalAssets(id)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
ret.Data = map[string]interface{}{"closeTimeout": 5000}
return
}
}
func netImg2LocalAssets(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)