An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: 分享文档到链滴 https://github.com/siyuan-note/siyuan/issues/2004
Liang Ding6a0d69cfef97
diff --git a/kernel/model/assets.go b/kernel/model/assets.goindex f7c50786e5..c13262647c 100644--- a/kernel/model/assets.go+++ b/kernel/model/assets.go@@ -34,6 +34,7 @@ import ("github.com/88250/gulu""github.com/88250/lute/ast""github.com/88250/lute/parse"+ "github.com/dustin/go-humanize""github.com/gabriel-vasile/mimetype""github.com/siyuan-note/filelock""github.com/siyuan-note/httpclient"@@ -327,13 +328,20 @@ func uploadCloud(sqlAssets []*sql.Asset) (err error) {return}+ limitSize := uint64(3 * 1024 * 1024) // 3MB+ if IsSubscriber() {+ limitSize = 10 * 1024 * 1024 // 10MB+ }var completedUploadAssets []stringfor _, absAsset := range uploadAbsAssets {- if fi, statErr := os.Stat(absAsset); nil != statErr {+ fi, statErr := os.Stat(absAsset)+ if nil != statErr {logging.LogErrorf("stat file [%s] failed: %s", absAsset, statErr)return statErr- } else if 10*1024*1024 <= fi.Size() {- logging.LogWarnf("file [%s] larger than 10MB, ignore uploading it", absAsset)+ }++ if limitSize < uint64(fi.Size()) {+ logging.LogWarnf("file [%s] larger than limit size [%s], ignore uploading it", humanize.IBytes(limitSize), absAsset)continue}