mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 07:24:07 +01:00
🎨 Alert users when .sy file or database .json exceed 8MB https://github.com/siyuan-note/siyuan/issues/15451
This commit is contained in:
parent
f3cc641005
commit
eb13c34fe5
22 changed files with 98 additions and 15 deletions
|
|
@ -19,6 +19,7 @@ package av
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
|
@ -543,6 +544,11 @@ func SaveAttributeView(av *AttributeView) (err error) {
|
|||
logging.LogErrorf("save attribute view [%s] failed: %s", av.ID, err)
|
||||
return
|
||||
}
|
||||
|
||||
if util.ExceedLargeFileWarningSize(len(data)) {
|
||||
msg := fmt.Sprintf(util.Langs[util.Lang][268], av.Name+" "+filepath.Base(avJSONPath), util.LargeFileWarningSize)
|
||||
util.PushErrMsg(msg, 7000)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue