🎨 超链接地址更好地兼容本地路径 https://github.com/siyuan-note/siyuan/issues/5980

This commit is contained in:
Liang Ding 2022-09-27 14:45:24 +08:00
parent af25cf1d7c
commit bc6f6e467e
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 12 additions and 7 deletions

View file

@ -231,8 +231,13 @@ func insertLocalAssets(c *gin.Context) {
for _, pathArg := range assetPathsArg {
assetPaths = append(assetPaths, pathArg.(string))
}
isUpload := true
isUploadArg := arg["isUpload"]
if nil != isUploadArg {
isUpload = isUploadArg.(bool)
}
id := arg["id"].(string)
succMap, err := model.InsertLocalAssets(id, assetPaths)
succMap, err := model.InsertLocalAssets(id, assetPaths, isUpload)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()