From f35a7f88921d3ca13919ad429c1f38dbf286fd7e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 3 Sep 2025 11:54:19 +0800 Subject: [PATCH] :bug: PDF files with too long file names cannot generate annotated images https://github.com/siyuan-note/siyuan/issues/15739 https://github.com/siyuan-note/siyuan/issues/10666 --- kernel/model/upload.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/model/upload.go b/kernel/model/upload.go index d75836aec..daa4e5240 100644 --- a/kernel/model/upload.go +++ b/kernel/model/upload.go @@ -197,8 +197,8 @@ func Upload(c *gin.Context) { succMap[baseName] = existAsset.Path } else { if skipIfDuplicated { - // https://github.com/siyuan-note/siyuan/issues/10666 - matches, globErr := filepath.Glob(assetsDirPath + string(os.PathSeparator) + strings.TrimSuffix(fName, ext) + "*") + // 复制 PDF 矩形注解时不再重复插入图片 No longer upload image repeatedly when copying PDF rectangle annotation https://github.com/siyuan-note/siyuan/issues/10666 + matches, globErr := filepath.Glob(assetsDirPath + string(os.PathSeparator) + strings.TrimSuffix(fName, ext) + "*" + ext) if nil != globErr { logging.LogErrorf("glob failed: %s", globErr) } else {