♻️ Supports converting network assets in the database to local https://github.com/siyuan-note/siyuan/issues/12096

This commit is contained in:
Daniel 2024-07-26 18:41:46 +08:00
parent 2a7702a78b
commit df8d70995c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 78 additions and 231 deletions

View file

@ -35,7 +35,7 @@ func netAssets2LocalAssets(c *gin.Context) {
}
id := arg["id"].(string)
err := model.NetAssets2LocalAssets(id)
err := model.NetAssets2LocalAssets(id, false, "")
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
@ -58,7 +58,7 @@ func netImg2LocalAssets(c *gin.Context) {
if urlArg := arg["url"]; nil != urlArg {
url = urlArg.(string)
}
err := model.NetImg2LocalAssets(id, url)
err := model.NetAssets2LocalAssets(id, true, url)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()