mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve asset name normalization when inserting/uploading https://github.com/siyuan-note/siyuan/issues/12255
This commit is contained in:
parent
05167fefe4
commit
52877f42d0
1 changed files with 2 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
f.Close()
|
f.Close()
|
||||||
succMap[baseName] = "assets/" + fName
|
succMap[fName] = "assets/" + fName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IncSync()
|
IncSync()
|
||||||
|
|
@ -284,7 +284,7 @@ func Upload(c *gin.Context) {
|
||||||
os.RemoveAll(tmpDir2)
|
os.RemoveAll(tmpDir2)
|
||||||
}
|
}
|
||||||
|
|
||||||
succMap[baseName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
succMap[fName] = strings.TrimPrefix(path.Join(relAssetsDirPath, fName), "/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue