🎨 Display a confirmation prompt when inserting large assets 256MB https://github.com/siyuan-note/siyuan/issues/16685

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-08 22:37:59 +08:00
parent 251e73b845
commit 320d2f65e5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -34,7 +34,7 @@ func readFilePaths(c *gin.Context) {
paths, _ = clipboard.ReadFilePaths()
}
data := map[string]map[string]any{}
var data []map[string]any
for _, path := range paths {
fi, err := os.Stat(path)
if nil != err {
@ -42,12 +42,13 @@ func readFilePaths(c *gin.Context) {
continue
}
data[path] = map[string]any{
data = append(data, map[string]any{
"name": fi.Name(),
"size": fi.Size(),
"isDir": fi.IsDir(),
"updated": fi.ModTime().UnixMilli(),
}
"path": path,
})
}
ret.Data = data
}