How Documenso Handles PDF File Upload In Next.js App Router
Documenso's pdf file upload handled in Next.js app router, code found in documents/page.tsx and upload-document.tsx.
In this article, we analyse how Documenso, an open-source Docusign alternative, handles pdf file upload in Next.js app router. But first, where is the code that takes care of upload? To find that out, we first need to know where in the user interface on Documenso we upload pdf files. Where is the file upload related code? When you visit /documents, you see a widget shown below that lets you upload pdf files in the Documenso dashboard. Since Documenso uses Next.js app router and the url ends with /documents, we are looking for a folder named documents in the Documenso source code. Yo...