mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve converting network assets to local assets https://github.com/siyuan-note/siyuan/issues/15320
This commit is contained in:
parent
5d229eb589
commit
513aadb9d5
2 changed files with 17 additions and 1 deletions
|
@ -285,7 +285,7 @@ func NetAssets2LocalAssets(rootID string, onlyImg bool, originalURL string) (err
|
|||
name, _ = url.PathUnescape(name)
|
||||
name = util.FilterUploadFileName(name)
|
||||
ext := util.Ext(name)
|
||||
if "" == ext {
|
||||
if !util.IsCommonExt(ext) {
|
||||
if mtype := mimetype.Detect(data); nil != mtype {
|
||||
ext = mtype.Extension()
|
||||
name += ext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue