Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add backend file size limit #2658
This PR adds back a backend file size check / limit for uploads. User uploads are limited to 25MB, while generated files are limited to 100MB.
In #2546 the backend file size check was removed. The 25MB limit was intended to apply to individual document uploads, however it was blocking office users from generating pdfs of the combined documents when the pdf size exceeded 25MB. But removing this check meant that the file size limit was only being enforced by the frontend and that generated files could be of unlimited size.
The frontend will block any uploads greater than 25MB, so to manually test the backend limit you can adjust the generated file size limit on line 44 in
The response should be an error indicating that the file is too large (status code 413) and the server logs should contain a similar message.
Code Review Verification Steps
@@ Coverage Diff @@ ## master #2658 +/- ## ======================================== - Coverage 56.3% 56.2% -0.1% ======================================== Files 271 272 +1 Lines 12393 12472 +79 ======================================== + Hits 6971 7002 +31 - Misses 4725 4771 +46 - Partials 697 699 +2
The requirement was that service members, office users, etc be limited to 25MB (to be in sync w/ what is already enforced on the frontend), but the generated documents would have a wider window, since they are going to be the combination of multiple up to 25MB documents.