Skip to content

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

: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

Danielf35a7f88921d
diff --git a/kernel/model/upload.go b/kernel/model/upload.go
index d75836aec5..daa4e5240a 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 {