gristlabs_grist-core/app/gen-server
Alex Hall 64a5c79dbc (core) Limit total attachment file size per document
Summary:
- Add a new parameter `Features.baseMaxAttachmentsBytesPerDocument` and set it to 1GB for the free team product.
- Add a method to DocStorage to calculate the total size of existing and used attachments.
- Add a migration to DocStorage adding an index to make the query in the above method fast.
- Check in ActiveDoc if uploading attachment(s) would exceed the product limit on that document.

Test Plan: Added test in `limits.ts` testing enforcement of the attachment limit.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3374
2022-04-14 16:33:09 +02:00
..
entity (core) Limit total attachment file size per document 2022-04-14 16:33:09 +02:00
lib (core) allow non-owners to remove themselves from sites/workspaces/docs 2022-04-13 10:04:32 -04:00
migration (core) Grace period and delete-only mode when exceeding row limit 2022-03-25 13:41:33 +02:00
ApiServer.ts (core) add users.options.isConsultant flag, and omit such users from billing 2022-04-11 10:26:31 -04:00
sqlUtils.ts (core) fix bug where sharing doc with everyone@ as viewer made it unlisted for site viewers 2021-10-28 12:48:31 -04:00