fix: notes over 2 MB open empty and cannot be edited (#33618)

A note over 2 MB, which one pasted screenshot can reach because images are embedded in the note, opened as an empty page and discarded what you typed. Live editing of notes had its own 2 MB limit, smaller than what the server accepts in one transfer, so it refused to load such notes. That limit now matches the server's 16 MB transfer limit, so any note the server can receive opens and saves again.

Fixes #33606
This commit is contained in:
Classic298 2026-11-03 12:59:19 +01:00 • committed by GitHub
parent fe2219d6f9
commit fa09d74644
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,7 +247,8 @@ class CachedRedisDict(RedisDict):
class YdocManager:
COMPACTION_THRESHOLD = 500
MAX_DOCUMENTS_PER_SESSION = 20
MAX_DOCUMENT_SIZE = 2 * 1024 * 1024
# Never below what one socket message can carry, or large notes open empty
MAX_DOCUMENT_SIZE = 16 * 1024 * 1024
def __init__(
self,