🎨 Alert users when .sy file or database .json exceed 8MB https://github.com/siyuan-note/siyuan/issues/15451

This commit is contained in:
Daniel 2025-08-24 10:49:13 +08:00
parent f3cc641005
commit eb13c34fe5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
22 changed files with 98 additions and 15 deletions

View file

@ -220,6 +220,11 @@ func WriteTree(tree *parse.Tree) (size uint64, err error) {
return
}
if util.ExceedLargeFileWarningSize(len(data)) {
msg := fmt.Sprintf(util.Langs[util.Lang][268], tree.Root.IALAttr("title")+" "+filepath.Base(filePath), util.LargeFileWarningSize)
util.PushErrMsg(msg, 7000)
}
afterWriteTree(tree)
return
}