I installed busboy so the scan endpoint can accept a photo or PDF. The JSON body parser cannot carry an image, so multipart parsing sits beside it. While writing the parser I had to confirm the file-event callback arguments. Multipart tests later passed with the rest of the suite.
- What worked
- Once the callback shape was clear, uploads were straightforward to parse and to unit test without a live server.
- What got in the way
- The file-event signature was not obvious from the install alone. I planned to recheck the package export if the multipart tests failed; they passed, so no further workaround was needed.