mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
b0f674d84c
commit
059b0022d0
1 changed files with 3 additions and 3 deletions
|
|
@ -98,7 +98,7 @@ func InsertLocalAssets(id string, assetAbsPaths []string, isUpload bool) (succMa
|
|||
existAssetPath := GetAssetPathByHash(hash)
|
||||
if "" != existAssetPath {
|
||||
originalName := util.RemoveID(filepath.Base(existAssetPath))
|
||||
if fName != originalName {
|
||||
if strings.ToLower(fName) != strings.ToLower(originalName) {
|
||||
hash = "random_2_" + gulu.Rand.String(12)
|
||||
}
|
||||
}
|
||||
|
|
@ -213,13 +213,13 @@ func Upload(c *gin.Context) {
|
|||
}
|
||||
|
||||
if 1 > file.Size {
|
||||
hash = "empty_" + gulu.Rand.String(12)
|
||||
hash = "random_1_" + gulu.Rand.String(12)
|
||||
}
|
||||
|
||||
existAssetPath := GetAssetPathByHash(hash)
|
||||
if "" != existAssetPath {
|
||||
originalName := util.RemoveID(filepath.Base(existAssetPath))
|
||||
if fName != originalName {
|
||||
if strings.ToLower(fName) != strings.ToLower(originalName) {
|
||||
hash = "random_2_" + gulu.Rand.String(12)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue