mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🧑💻 Fix API /api/asset/upload response body succMap field (#12361)
* 🐛 Fix API `/api/asset/upload` response body `succMap` field * 🐛 Fix #12255
This commit is contained in:
parent
6a3095c56c
commit
b924452eab
2 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||
return
|
||||
}
|
||||
f.Close()
|
||||
succMap[fName] = "assets/" + fName
|
||||
succMap[baseName] = "assets/" + fName
|
||||
}
|
||||
}
|
||||
IncSync()
|
||||
|
|
@ -284,7 +284,7 @@ func Upload(c *gin.Context) {
|
|||
os.RemoveAll(tmpDir2)
|
||||
}
|
||||
|
||||
succMap[fName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
succMap[baseName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue