The validation in the original PR for 10001 et al. correctly caught that corrupt-pdf is corrupt in the Cypress test but did not catch it outside of Cypress.
This PR thus does two things:
Ensures that our PDF file uploads within Cypress mimic the file uploads outside of Cypress by specifying that the upload is in binary format.
Implements an unfortunate solution--but as far as I can tell the only viable solution, unless we use something other than pdfjs--to catch corrupt but not fully invalid PDFs.
The validation in the original PR for 10001 et al. correctly caught that corrupt-pdf is corrupt in the Cypress test but did not catch it outside of Cypress.
This PR thus does two things: