mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve converting network assets to local assets https://github.com/siyuan-note/siyuan/issues/15320
This commit is contained in:
parent
513aadb9d5
commit
03d27d60e4
1 changed files with 2 additions and 2 deletions
|
|
@ -142,8 +142,8 @@ func extensionCopy(c *gin.Context) {
|
||||||
|
|
||||||
fName = util.FilterUploadFileName(fName)
|
fName = util.FilterUploadFileName(fName)
|
||||||
ext := util.Ext(fName)
|
ext := util.Ext(fName)
|
||||||
if "" == ext || strings.Contains(ext, "!") {
|
if !util.IsCommonExt(ext) || strings.Contains(ext, "!") {
|
||||||
// 改进浏览器剪藏扩展转换本地图片后缀 https://github.com/siyuan-note/siyuan/issues/7467
|
// 改进浏览器剪藏扩展转换本地图片后缀 https://github.com/siyuan-note/siyuan/issues/7467 https://github.com/siyuan-note/siyuan/issues/15320
|
||||||
if mtype := mimetype.Detect(data); nil != mtype {
|
if mtype := mimetype.Detect(data); nil != mtype {
|
||||||
ext = mtype.Extension()
|
ext = mtype.Extension()
|
||||||
fName += ext
|
fName += ext
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue