Add a max attachment size for diff file attachments.

Review Request #13579 — Created Feb. 27, 2024 and submitted — Latest diff uploaded


Review Board


This change adds a configurable maximum attachment size for file
attachments which are connected to diffs. This works very much like the
configured maximum diff size.

Our initial default is 10MB. This should be enough for most images and
documents. The limit can be changed in the diff settings page in the
admin site.

At the moment this is enforced on the server side when attempting to
create the attachment. The limit is also included in the server
capabilities object so clients can make a decision about whether to
attempt to upload. While doing this I also added the max diff size to
the capabilities.

Ran unit tests.