Uploading large multi-part files with Express
Before we wade into adding dependencies for external services and APIs in application, let's start with understanding how to implement the basics of a feature without any external dependencies. It's always worth considering the trade-offs involved in building your own solution to a problem versus leveraging an external cloud service to assist.
File uploading is a very common feature in web applications. From documents to images, files that need to be transferred from a user's desktop to any web service have to go through a multipart/form-data
file upload. In this recipe, we will add a backend API to upload images to our Express application, which we could then use to add a cover image to our blog posts.
Getting ready
We will continue to use an API client, such as Postman, for this chapter to test and develop our API endpoints. If you haven't installed Postman, or another client, I recommend that you do so to help make the cycle of retesting your...