In this section, we will create a microservice that allows clients to upload images and then download them. At first, we implement a handler to upload images and save them to a filesystem asynchronously using the tokio crate. After that, we will implement a downloading handler that allows the user to download original images from files that were uploaded before.
Creating an image service
Uploading images
Let's start implementing a microservice to store and serve images with an uploading files feature. To get incoming files, we have to read an incoming Stream of a Request. The Stream might be huge, so we shouldn't hold the whole file in memory. We will read the incoming data in chunks and write them immediately...