From fee908d01e23b692b5ee8da73611e1205f7be95f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 30 Sep 2023 20:19:26 +0800 Subject: [PATCH] :bug: The image does not display after pasting some PDF rectangular annotations Fix https://github.com/siyuan-note/siyuan/issues/9321 --- 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 72fdfcc46ec..d80e83b13f9 100644 --- a/kernel/model/upload.go +++ b/kernel/model/upload.go @@ -52,13 +52,13 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m } for _, p := range assetPaths { - fName := filepath.Base(p) + baseName := filepath.Base(p) + fName := baseName fName = util.FilterUploadFileName(fName) ext := filepath.Ext(fName) fName = strings.TrimSuffix(fName, ext) ext = strings.ToLower(ext) fName += ext - baseName := fName if gulu.File.IsDir(p) || !isUpload { if !strings.HasPrefix(p, "\\\\") { p = "file://" + p