mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
7cb288864b
The instance-wide maximum upload size in the storage setting and the per-user UPLOAD_BYTES usage limit were two caps on the same thing, with a rule that the per-user value could only lower the instance value. The storage setting field is removed, and the all-users UPLOAD_BYTES usage limit is the only per-file cap. A user's own limit replaces the default in either direction, and no limit means any file size. - Remove upload_size_limit_mb from the API and store storage settings, the 32 MiB store default, and the deployment config check. - Drop the FILE_TOO_LARGE error; every refusal is QUOTA_EXCEEDED with metric UPLOAD_BYTES. - Split usagelimit.CheckFileSize out of CheckUpload and call it from memo import, so import is no longer a bypass. - Remove the Maximum upload size field from the Storage section and the instance-limit warning from the usage limits dialog. The old value is not carried over. Instances that relied on the default accept any file size until an admin sets a limit.
core
Business rules that do not care about HTTP or SQL. A package lands here when it needs several store calls, or a decision, that more than one transport must apply the same way.
| Package | Owns |
|---|---|
access/ |
who may read a memo, given viewer, space membership, and share links |
notification/ |
building and dispatching inbox and email notifications |
memopayload/ |
rebuilding a memo's derived payload from its markdown |
memoexport/ |
the Memos Export Format container and records used for export and import |
usagelimit/ |
which usage limits apply to a user, and whether a memo create or an upload stays within them |
Layering: core may import store, provider, markdown, filter,
proto/gen, and internal. It must not import server or cmd. New
resource-specific rules extracted from server/api belong here, one package
per resource.