Skip to content

Commit

Permalink
🐛 The image does not display after pasting some PDF rectangular annot…
Browse files Browse the repository at this point in the history
…ations Fix #9321
88250 committed Sep 30, 2023

Verified

This commit was signed with the committer’s verified signature.
1 parent 11d2f7c commit fee908d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/model/upload.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fee908d

Please sign in to comment.