mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 08:30:42 +08:00
🐛 The image does not display after pasting some PDF rectangular annotations Fix https://github.com/siyuan-note/siyuan/issues/9321
This commit is contained in:
parent
11d2f7c580
commit
fee908d01e
@ -52,13 +52,13 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range assetPaths {
|
for _, p := range assetPaths {
|
||||||
fName := filepath.Base(p)
|
baseName := filepath.Base(p)
|
||||||
|
fName := baseName
|
||||||
fName = util.FilterUploadFileName(fName)
|
fName = util.FilterUploadFileName(fName)
|
||||||
ext := filepath.Ext(fName)
|
ext := filepath.Ext(fName)
|
||||||
fName = strings.TrimSuffix(fName, ext)
|
fName = strings.TrimSuffix(fName, ext)
|
||||||
ext = strings.ToLower(ext)
|
ext = strings.ToLower(ext)
|
||||||
fName += ext
|
fName += ext
|
||||||
baseName := fName
|
|
||||||
if gulu.File.IsDir(p) || !isUpload {
|
if gulu.File.IsDir(p) || !isUpload {
|
||||||
if !strings.HasPrefix(p, "\\\\") {
|
if !strings.HasPrefix(p, "\\\\") {
|
||||||
p = "file://" + p
|
p = "file://" + p
|
||||||
|
Loading…
Reference in New Issue
Block a user