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 siyuan-note#9321
  • Loading branch information
88250 committed Sep 30, 2023
1 parent 83dce4f commit 11d2f7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/model/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ func Upload(c *gin.Context) {
succMap := map[string]interface{}{}
files := form.File["file[]"]
for _, file := range files {
fName := file.Filename
baseName := file.Filename

fName := baseName
fName = util.FilterUploadFileName(fName)
ext := filepath.Ext(fName)
fName = strings.TrimSuffix(fName, ext)
ext = strings.ToLower(ext)
fName += ext
baseName := fName
f, openErr := file.Open()
if nil != openErr {
errFiles = append(errFiles, fName)
Expand Down

0 comments on commit 11d2f7c

Please sign in to comment.