🎨 Improve asset name normalization when inserting/uploading https://github.com/siyuan-note/siyuan/issues/12255
This commit is contained in:
parent
05167fefe4
commit
52877f42d0
1 changed files with 2 additions and 2 deletions
|
@ -100,7 +100,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||
return
|
||||
}
|
||||
f.Close()
|
||||
succMap[baseName] = "assets/" + fName
|
||||
succMap[fName] = "assets/" + fName
|
||||
}
|
||||
}
|
||||
IncSync()
|
||||
|
@ -284,7 +284,7 @@ func Upload(c *gin.Context) {
|
|||
os.RemoveAll(tmpDir2)
|
||||
}
|
||||
|
||||
succMap[baseName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
succMap[fName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue