Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: https://github.com/siyuan-note/siyuan/issues/17079#issuecomment-3940571835

Daniel6b0732c99bd5
diff --git a/kernel/model/upload.go b/kernel/model/upload.go
index 767d851c4a..f88ac48c38 100644
--- a/kernel/model/upload.go
+++ b/kernel/model/upload.go
@@ -104,7 +104,7 @@ func InsertLocalAssets(id string, assetAbsPaths []string, isUpload bool) (succMa
}
if "" != existAssetPath && !strings.HasPrefix(hash, "random_") {
- succMap[baseName] = existAssetPath
+ succMap[baseName] = strings.TrimPrefix(existAssetPath, "/")
} else {
fName = util.AssetName(fName, ast.NewNodeID())
writePath := filepath.Join(assetsDirPath, fName)