From 059b0022d0d1e4082bf78a66af664c43be48738e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 15 Dec 2025 10:46:56 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16576#issuecomment-3652567696 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/upload.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/upload.go b/kernel/model/upload.go index 76f9e9ec7..01ad50291 100644 --- a/kernel/model/upload.go +++ b/kernel/model/upload.go @@ -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) } }