mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-29 11:46:09 +01:00
🎨 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:
parent
251e73b845
commit
320d2f65e5
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue