UINV-108 reports that large file uploads crash the browser. As it turns out, invoice documents should never reach the sizes used to reproduce that issue. They will typically be PDFs that are a few pages long.
Enforcing a size limit of 20MB for invoice documents is a reasonable way to avoid this issue.
If there is some need to attach a document larger than this limit, it can always be "linked" to the invoice instead of uploaded.
It's OK to hardcode this limit for now.
When a user tries to upload a file larger than the limit, an appropriate error message is displayed.
NOTE: A separate story will address a similar memory pressure issue on the backend
- A file upload size limit is enforced
- Appropriate error message is returned when uploading files exceeding the size limit